public void Move(string id, Vector2 position, int speed = 0, EffectHolderNode observer = null) { GameObject go = GameObject.Find(id); Mover m = go.GetComponent <Mover>(); if (m != null) { if (speed == 0) { m.MoveInstant(position); } else { m.MoveFreely(position, observer, data => { EffectHolderNode tmp = (EffectHolderNode)data; tmp.doPulse(); Game.Instance.ContinueEffectExecution(); }, null); } } else { ScenePositioner r = go.GetComponent <ScenePositioner>(); r.Position = position; } }
protected void Start() { representable = GetComponent <Representable>(); scenePositioner = GetComponent <ScenePositioner>(); if (scenePositioner) { representable.Play("stand"); } }
protected void Start() { mover = GetComponent <Mover>(); representable = GetComponent <Representable>(); scenePositioner = GetComponent <ScenePositioner>(); }