Beispiel #1
0
    protected void Awake()
    {
        climb    = GetComponent <Climb>();
        health   = GetComponent <Health>();
        movement = GetComponent <Movement>();

        animationFlip = gameObject.AddComponent <AnimationFlip>();

        climb.CustomCharacterController = this;
    }
Beispiel #2
0
        /// <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);
        }