Пример #1
0
        private void Awake()
        {
            if (Animal == null)
            {
                Animal = GetComponent <MAnimal>();
            }
            Anim       = Animal.GetComponent <Animator>();
            MountInput = Animal.GetComponent <IInputSource>();

            MountTriggers = GetComponentsInChildren <MountTriggers>(true).ToList(); //Catche all the MountTriggers of the Mount

            CanBeDismountedByState = CanBeMountedByState = true;                    //Set as true can be mounted and canbe dismounted by state
            defaultStraightSpine   = StraightSpine;
            if (Anim)
            {
                DefaultAnimUpdateMode = Anim.updateMode;
            }

            if (!StraightSpineOffsetTransform)
            {
                StraightSpineOffsetTransform = transform;
            }
        }