void CharacterMovementUpdate(CharacterInputManage _CI) { if (Input.GetKey(_CI.MoveUp)) { Vector3 position = this.transform.position; position.y += Speed; this.transform.position = position; } if (Input.GetKey(_CI.MoveDown)) { Vector3 position = this.transform.position; position.y -= Speed; this.transform.position = position; } if (Input.GetKey(_CI.MoveRight)) { Vector3 position = this.transform.position; position.x += Speed; this.transform.position = position; } if (Input.GetKey(_CI.MoveLeft)) { Vector3 position = this.transform.position; position.x -= Speed; this.transform.position = position; } }
void Start() { _CI = GetComponent <CharacterInputManage>(); FirePos = transform.GetChild(0).gameObject; //GetWeapon weapon = this.transform.GetComponentInChildren <Weapon>(); //weapon.SetWeaponWithType(weaponType); SetWeaponGun(); weapon.Owner = this.transform.gameObject; }
void Start() { _CI = GetComponent <CharacterInputManage>(); characterMovement = GetComponent <CharacterMovement>(); characterFire = GetComponent <CharacterFire>(); }
// Use this for initialization void Start() { _CI = GetComponent <CharacterInputManage>(); }