public void BaseStart() { if (equipable != null) { equipable.SetEquipment(this); } }
public bool SpawnInWorld(Vector3 position, Quaternion rotation, Vector3 velocity) { Deactivate(); RemoveFromWorld(); equipable = (Equipable)Instantiate(equipablePrefab, position, rotation); equipable.SetEquipment(this); Rigidbody rigidbody = equipable.GetComponent <Rigidbody>(); if (rigidbody != null) { rigidbody.velocity = velocity; } return(true); }
public bool SpawnInWorld(Vector3 position, Quaternion rotation, Vector3 velocity) { Deactivate(); RemoveFromWorld(); equipable = (Equipable)Instantiate(equipablePrefab, position, rotation); equipable.SetEquipment(this); Rigidbody rigidbody = equipable.GetComponent<Rigidbody>(); if (rigidbody != null) rigidbody.velocity = velocity; return true; }