public void Instantiate(PlayerInfos infos, float z_offset) { controls = infos.GetControls(); if (infos.GetBoatId() == GameTime.BLUE_BOAT_ID) { boat = GameTime.GetBlueBoat(); } else { boat = GameTime.GetRedBoat(); } this.gameObject.transform.position = boat.gameObject.transform.position + new Vector3(0, 5, z_offset); infos.GetModelInfos().SetModelToModelParameters(this.gameObject); }
public void InstantiateMenu(PlayerInfos infos) { controls = new PlayerControls('V', "VoidAxis", "VoidAxis", "VoidKey", "VoidKey", PlayerControls.VIDE); if (infos.GetBoatId() == GameTime.BLUE_BOAT_ID) { boat = GameTime.GetBlueBoat(); } else { boat = GameTime.GetRedBoat(); } infos.GetModelInfos().SetModelToModelParameters(this.gameObject); SetIsInteracting(true); transform.localScale = new Vector3(3, 3, 3); gameObject.GetComponent <Rigidbody>().isKinematic = true; }