protected override void OnAwake()
    {
        user      = transform.parent.GetComponent <BasePlayer> ();
        userState = transform.parent.GetComponent <PlayerStateModule> ();
        anim      = GetComponent <MeshRenderer> ();
//		Debug.LogError ("EQUIPMENT SETUP");
        currentState = EquipmentActions.Idle;
    }
Example #2
0
        public override bool TakeDamage(DamageInfo info)
        {
            RagdollBone closestRagdollBone = this.GetClosestRagdollBone(info.m_Position);

            if (closestRagdollBone)
            {
                info.m_Damage *= closestRagdollBone.GetDamageMultiplier(false);
            }
            this.m_LastDamageInfo = info;
            bool flag = base.TakeDamage(info);

            if (flag && info.m_Damager && info.m_Damager.GetComponent <ReplicatedLogicalPlayer>())
            {
                PlayerStateModule.Get().OnGiveDamageToAI(this, info);
            }
            return(flag);
        }
 protected override void OnAwake()
 {
     user = transform.parent.GetComponent<BasePlayer> ();
     userState = transform.parent.GetComponent<PlayerStateModule> ();
     anim = GetComponent<MeshRenderer> ();
     //		Debug.LogError ("EQUIPMENT SETUP");
     currentState = EquipmentActions.Idle;
 }
Example #4
0
 public override bool CanTrigger()
 {
     return((this.m_Trap || PlayerStateModule.Get().m_State != PlayerStateModule.State.Combat) && !ReplicatedPlayerTriggerHelper.IsTriggerExecutedByOtherPlayer(this) && base.CanTrigger());
 }
 public override bool ShowAdditionalInfo()
 {
     return(PlayerStateModule.Get().m_State == PlayerStateModule.State.Combat);
 }
 public override bool CanExecuteActions()
 {
     return(base.enabled && base.CanExecuteActions() && PlayerStateModule.Get().m_State != PlayerStateModule.State.Combat);
 }