protected void Awake() { climb = GetComponent <Climb>(); health = GetComponent <Health>(); movement = GetComponent <Movement>(); animationFlip = gameObject.AddComponent <AnimationFlip>(); climb.CustomCharacterController = this; }
/// <summary> /// Load the flip animations of the sprites /// </summary> private void LoadFlipAnimations() { // Flip animations (for lasers) AnimationFlip flipAni = null; flipAni = AnimationFlipManager.Active.Create(Sprite.Name.LaserAlienDagger, this.FrameInterval * 0.2f, true); flipAni.Attach(false, true); flipAni = AnimationFlipManager.Active.Create(Sprite.Name.LaserAlienZigzag, this.FrameInterval * 0.2f, true); flipAni.Attach(true, false); }