local TouchScreenEffectView = BaseClass("TouchScreenEffectView", UIBaseView)
local base = UIBaseView
local Input = CS.UnityEngine.Input
local CSUtils = CS.CSUtils
local OnCreate = function(self)
  base.OnCreate(self)
  self.particle = self.transform:Find("TouchScreenEffect"):GetComponent(typeof(CS.UnityEngine.ParticleSystem))
end
local OnDestroy = function(self)
  base.OnDestroy(self)
end
local OnAddListener = function(self)
  base.OnAddListener(self)
  self:AddUIListener(EventId.OnWorldInputPointDown, self.OnWorldInputPointDownSignal)
end
local OnRemoveListener = function(self)
  base.OnRemoveListener(self)
  self:RemoveUIListener(EventId.OnWorldInputPointDown, self.OnWorldInputPointDownSignal)
end
local OnWorldInputPointDownSignal = function(self)
  if Input.touchCount <= 1 then
    CSUtils.SetPositionFromInput(self.transform)
    self.particle.gameObject:SetActive(true)
    self.particle:Play()
  end
end
TouchScreenEffectView.OnCreate = OnCreate
TouchScreenEffectView.OnDestroy = OnDestroy
TouchScreenEffectView.OnAddListener = OnAddListener
TouchScreenEffectView.OnRemoveListener = OnRemoveListener
TouchScreenEffectView.OnWorldInputPointDownSignal = OnWorldInputPointDownSignal
return TouchScreenEffectView
