public void SetPosition(int x, int y) { positionI.x = x; positionI.y = y; targetPosition = new Vector3(x, y, 0); Go.defaultEaseType = GoEaseType.Linear; Go.to(gameObject.transform, 0.1f, TweenManager.TweenConfigCurrent().localPosition(targetPosition)); }
public void Hit(int hitAmount = 1) { health -= hitAmount; if (hasTypes.Contains(RLTypes.MONSTER)) { tintColor = GetComponent <SpriteRenderer>().color = Color.red; } Go.to(gameObject.transform, 0.2f, TweenManager.TweenConfigCurrent().onBegin(PlayHitAnimation)); }
public void Kill() { // Go.to (gameObject.transform, 0.2f, TweenManager.TweenConfigCurrent().scale(2).onIterationEnd(FinalKill)); Go.to(gameObject.transform, 0.2f, TweenManager.TweenConfigCurrent().scale(2).materialColor(Color.clear).onIterationEnd(FinalKill)); }
public void Attack(Vector2i target) { Vector3 tPos = transform.position + (new Vector3(target.x, target.y) - transform.position) * 0.5f; Go.to(gameObject.transform, 0.5f, TweenManager.TweenConfigCurrent().position(tPos).setEaseType(GoEaseType.Punch).onBegin(PlayHit)); }