public AttributeMark(C_Attributes _attributes, string _name, float _value, string _operation) { this.attributes = _attributes; this.name = _name; this.value = _value; this.operation = _operation; }
private void Awake() { photonView = GetComponent <PhotonView>(); audioSource = GetComponent <AudioSource>(); velocity = GetComponent <C_Velocity>(); attributes = GetComponent <C_Attributes>(); }
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>(); }
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); }
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); }
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(); }
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>(); }
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)); }
public void Init(C_Attributes attributes, C_UiEventMgr eventMgr) { nameText.color = (attributes.camp == Battle.localPlayerCamp) ? friendColor : enemyColor; eventMgr.BindEvent(typeof(UiMsgs.Hp), RefreshHp); }