Пример #1
0
    /// <summary>
    /// The Manager Of The Arms if its WithGun Or not
    /// </summary>
    /// <param name="Objective">The Objective will be Pointing</param>
    public void ArmsManager(Vector3 Objective)
    {
        if (!WithGun)
        {
            FightingObject.Move();
            FightingObject.AnimationManager();
            FightingObject.Attacks();
        }
        else
        {
            ShootingObject.GetDirectionAndAngle(Objective);
            ShootingObject.WithgunMove();
            ShootingObject.RotateArm();
            ShootingObject.Aiming();
            ShootingObject.Shooting();
            ShootingObject.Reload();
        }

        ShootingObject.IlluminateShoot();
        if (GameplayActions.QuitShootAction)
        {
            WithGun = !WithGun;
        }
        ShootingObject.ArmsAnim.SetBool("CanShowup", CanShowup());
    }
        public static bool IsReadyToCast(this FightingObject obj, CharacterSpellSlot slot)
        {
            //NOTE: GetEventHandler Generic param. 0 is internal type of CastSpellEventHandler
            CastSpellEventHandler eventHandler = obj.GetEventHandler <ayt>();

            if (eventHandler && eventHandler.IsReady((byte)slot))
            {
                return(true);
            }

            return(false);
        }
        public static FightingObjectView GetAttackTarget(this FightingObject obj)
        {
            var attackTargetId = obj.GetTargetId();

            if (attackTargetId > 0)
            {
                if (GameManager.GetInstance().GetView_Safe(attackTargetId) is FightingObjectView target)
                {
                    return(target);
                }
            }

            return(default(FightingObjectView));
        }