public AttributeMark(C_Attributes _attributes, string _name, float _value, string _operation)
 {
     this.attributes = _attributes;
     this.name       = _name;
     this.value      = _value;
     this.operation  = _operation;
 }
Beispiel #2
0
 private void Awake()
 {
     photonView  = GetComponent <PhotonView>();
     audioSource = GetComponent <AudioSource>();
     velocity    = GetComponent <C_Velocity>();
     attributes  = GetComponent <C_Attributes>();
 }
Beispiel #3
0
 private void Awake()
 {
     _camera              = GetComponent <C_Camera>();
     _animator            = GetComponent <C_Animator>();
     _velocity            = GetComponent <C_Velocity>();
     _stateMgr            = GetComponent <CS_StateMgr>();
     _attributes          = GetComponent <C_Attributes>();
     _iKManager           = GetComponent <C_IKManager>();
     _audioSource         = GetComponent <AudioSource>();
     _characterController = GetComponent <CharacterController>();
 }
Beispiel #4
0
    private void OnEnable()
    {
        _camera              = GetComponent <C_Camera>();
        _animator            = GetComponent <C_Animator>();
        _velocity            = GetComponent <C_Velocity>();
        _attributes          = GetComponent <C_Attributes>();
        _audioSource         = GetComponent <AudioSource>();
        _characterController = GetComponent <CharacterController>();

        var stateMgr = GetComponent <CS_StateMgr>();

        //_name = "aim";
        stateMgr.RegState(_name, this);
    }
    private void Awake()
    {
        _uiMgr               = GetComponent <C_UiEventMgr>();
        _weaponHandle        = GetComponent <C_WeaponHandle>();
        _camera              = GetComponent <C_Camera>();
        _animator            = GetComponent <C_Animator>();
        _velocity            = GetComponent <C_Velocity>();
        _attributes          = GetComponent <C_Attributes>();
        _audioSource         = GetComponent <AudioSource>();
        _characterController = GetComponent <CharacterController>();

        var stateMgr = GetComponent <CS_StateMgr>();

        //_name = "aim";
        stateMgr.RegState(_name, this);
    }
Beispiel #6
0
 public static AttributeMark Add(ref C_Attributes attributes, string pName, float value, string operation = "+")
 {
     switch (pName)
     {
     case "HP":
         AddOperate(ref attributes.HP, value, operation);
         return(new AttributeMark(attributes, "rate", (operation.Equals("=") ? attributes.HP : value), operation));
         //case "speed":
         //    AddOperate(ref attributes.speed, value, operation);
         //    return new AttributeMark(attributes, "rate", (operation.Equals("=") ? attributes.speed : value), operation);
         //case "rate":
         //    AddOperate(ref attributes.rate, value, operation);
         //    return new AttributeMark(attributes, "rate", (operation.Equals("=") ? attributes.rate : value), operation);
     }
     return(null);
 }
Beispiel #7
0
    public override void Init(GameObject obj)
    {
        _uiMgr        = obj.GetComponent <C_UiEventMgr>();
        _camera       = obj.GetComponent <C_Camera>();
        _velocity     = obj.GetComponent <C_Velocity>();
        _iKManager    = obj.GetComponent <C_IKManager>();
        _photonView   = obj.GetComponent <PhotonView>();
        _attributes   = obj.GetComponent <C_Attributes>();
        _weaponHandle = obj.GetComponent <C_WeaponHandle>();
        _battleMgr    = obj.GetComponent <C_BattleMgr>();

        _audio           = GetComponent <AudioSource>();
        _weaponAttribute = GetComponent <WeaponAttribute>();

        timer = new Timer();
    }
Beispiel #8
0
    private void OnEnable()
    {
        anim                = GetComponent <C_Animator>();
        uiMgr               = GetComponent <C_UiEventMgr>();
        myCamera            = GetComponent <C_Camera>();
        velocity            = GetComponent <C_Velocity>();
        iKManager           = GetComponent <C_IKManager>();
        attributes          = GetComponent <C_Attributes>();
        weaponHandle        = GetComponent <C_WeaponHandle>();
        bornProtector       = GetComponent <C_BornProtector>();
        attackListener      = GetComponent <C_AttackListener>();
        avatarMeshRanderMgr = GetComponentInChildren <AvatarMeshRanderMgr>();

        var stateMgr = GetComponent <CS_StateMgr>();

        //_name = "aim";
        stateMgr.RegState(_name, this);

        //meshRenderers = GetComponentsInChildren<MeshRenderer>();
        //skinnedMeshRenderers = GetComponentsInChildren<SkinnedMeshRenderer>();
    }
Beispiel #9
0
 public static AttributeMark AddRate(ref C_Attributes attributes, float value, string operation = "+")
 {
     AddOperate(ref attributes.rate, value, operation);
     return(new AttributeMark(attributes, "rate", (operation.Equals("=") ? attributes.rate : value), operation));
 }
Beispiel #10
0
    public void Init(C_Attributes attributes, C_UiEventMgr eventMgr)
    {
        nameText.color = (attributes.camp == Battle.localPlayerCamp) ? friendColor : enemyColor;

        eventMgr.BindEvent(typeof(UiMsgs.Hp), RefreshHp);
    }