// Start is called before the first frame update void Start() { BroadcastMessage("SetCamera", viewerCamera); depth = transform.localPosition.z; fighterSprite = fighter.GetComponent <SpriteHandler>(); handles = GetComponentsInChildren <BoxResizerHandle>(); //We set the "real" position of the box to the "real" center of the sprite, then set the rect center to the "pixel space" center of the sprite displayBox.transform.position = fighterSprite.getCenterPoint(); boxRect.center = displayBox.transform.localPosition; SelectedForEditing = false; }
public void EffectController(string anim, BattleObject user) { var playerAnim = user.GetComponent <Animator>(); user.canMove = false; playerAnim.Play(anim); StartCoroutine(EffectAnimationCoroutine(1f, anim, user)); if (animType == ChipAnimTypes.shoot) { StartCoroutine(ShootCoroutine(user)); } }