public void SetGhost(GhostController ghost) { if (_ghost != null) RemoveGhost(); _view.ChargeBar.SetVisible(false); _ghost = ghost; _ghost.transform.localPosition += new Vector3(0, 50, 0); SetChargeBarValue(ChargePower); PlaySparkParticle(); SendLinkPower(true); }
public void OnTouch(Gesture gesture) { Debug.Log($"{gameObject.name} is touched."); if (_ghost == null) { GhostController.Create(Constants.GhostID.Com, transform, ghost => { SetGhost(ghost); }); } else { RemoveGhost(); } }