public void ActorStats(SOActorModel actorModel) { health = actorModel.health; travelSpeed = actorModel.speed; hitPower = actorModel.hitPower; score = actorModel.score; }
void CreatePlayer() { //been shopping if (GameObject.Find("UpgradedShip")) { upgradedShip = true; } //not shopped or died //default ship build if (!upgradedShip || GameManager.Instance.Died) { GameManager.Instance.Died = false; actorModel = Object.Instantiate(Resources.Load("Script/ScriptableObject/Player_Default")) as SOActorModel; playerShip = GameObject.Instantiate(actorModel.actor, this.transform.position, Quaternion.Euler(0, 180, 0)) as GameObject; playerShip.GetComponent <IActorTemplate>().ActorStats(actorModel); } //apply the shop upgrades else { playerShip = GameObject.Find("UpgradedShip"); } playerShip.transform.rotation = Quaternion.Euler(-90, 180, 0); playerShip.transform.localScale = new Vector3(60, 60, 60); playerShip.GetComponentInChildren <ParticleSystem>().transform.localScale = new Vector3(25, 25, 25); playerShip.name = "Player"; playerShip.transform.SetParent(this.transform); playerShip.transform.position = Vector3.zero; playerShip.GetComponent <PlayerTransition>().enabled = true; }
//ACTORSTATS public void ActorStats(SOActorModel actorModel) { health = actorModel.health; travelSpeed = actorModel.speed; hitPower = actorModel.hitPower; fire = actorModel.actorsBullets; }
public void ActorStats(SOActorModel actorModel) { _health = actorModel.health; _travelSpeed = actorModel.speed; _hitPower = actorModel.hitPower; _fire = actorModel.actorBullets; }
public void ActorStats(SOActorModel actorModel) { health = actorModel.health; GetComponent <NavMeshAgent>().speed = actorModel.speed; hitPower = actorModel.hitPower; score = actorModel.score; }
public void ActorStats(SOActorModel actorModel) { hitPower = actorModel.hitPower; health = actorModel.health; travelSpeed = actorModel.speed; actor = actorModel.actor; }
void CreatePlayer() { actorModel = Object.Instantiate(Resources.Load("Script/ScriptableObject/Player_Default")) as SOActorModel; playerShip = GameObject.Instantiate(actorModel.actor) as GameObject; playerShip.GetComponent <Player>().ActorStats(actorModel); playerShip.transform.rotation = Quaternion.Euler(-90, 180, 0); playerShip.transform.localScale = new Vector3(60, 60, 60); playerShip.name = "Player"; playerShip.transform.SetParent(this.transform); playerShip.transform.position = Vector3.zero; }
private void CreatePlayer() { // CREATE PLAYER _actorModel = Instantiate(Resources.Load(PathName.PLAYER_DEFAULT)) as SOActorModel; _playerShip = Instantiate(_actorModel.actor) as GameObject; _playerShip.GetComponent <Player>().ActorStats(_actorModel); // SET PLAYER UP _playerShip.transform.rotation = Quaternion.Euler(0, 180, 0); _playerShip.transform.localScale = new Vector3(60, 60, 60); _playerShip.name = ObjectName.Player; _playerShip.transform.SetParent(this.transform); _playerShip.transform.position = Vector3.zero; }