public void Setup(BaseSpell data) { if (data.Action != null) { actionReceiver = gameObject.AddComponent(data.Action.GetType()) as IActionReceiver; actionReceiver.Setup(data.Action as IActionReceiver); actionReceiver.Action(transform.position, 0f); } }
public void Action(Vector3 dir, float val) { if (MatchManager.IsMyTurn(data.teamId) && !activated && GetPropertyModifier("freeze") == null) { if (actionReceiver != null) { actionReceiver.Action(dir, val); activated = true; view.color = Color.grey; } } }