private void Update() { Move(); // 임시 무기변경 if (Input.GetKeyUp(KeyCode.Tab)) { if (weaponMode == WeaponMode.Sword) { weaponMode = WeaponMode.Gun; } else { weaponMode = WeaponMode.Sword; } currentWeapon.gameObject.SetActive(false); CurrentWeapon = weaponInfo.weaponList[(int)weaponMode]; currentWeapon.gameObject.SetActive(true); } if (Input.GetMouseButtonDown(0)) { MouseAttack(); } }
public AbsCharacter OnInit(GameObject _gameObject, CharacterAttr _characterAttr, AbsWeapon _weapon, Vector3 _pos) { CharacterGameObject = _gameObject; CharacterGameObject.transform.position = _pos; CharacterAttr = _characterAttr; navMeshAgent = _gameObject.GetComponent <NavMeshAgent>(); audioSource = _gameObject.GetComponent <AudioSource>(); anim = _gameObject.GetComponentInChildren <Animation>(); collider = _gameObject.GetComponent <CapsuleCollider>(); Weapon = _weapon; Weapon.OnInit(this); return(this); }
public Minion(AbstractFactory forBody, AbstractFactory forWeapon) { body = forBody.CreateBody(); weapon = forWeapon.CreateWeapon(); }
public Minion(AbstractFactory factory) { body = factory.CreateBody(); weapon = factory.CreateWeapon(); }
private Minion(AbsBody b, AbsWeapon w) { body = b; weapon = w; Console.WriteLine("создался клон обьекта "); }