public void SetAnimationFrame(string name, int frame) { PauseAnimation(); SwitchAnimation(name); if (currentAnimation) { currentAnimation.InitMaterial(); currentAnimation.SetFrame(frame); } }
// Use this for initialization void Start() { inputManager = GetComponent <InputManager>(); dollSprite.InitMaterial(); dollSprite.SetFrame(1); }