예제 #1
0
 public void BaseStart()
 {
     if (equipable != null)
     {
         equipable.SetEquipment(this);
     }
 }
예제 #2
0
    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);
    }
예제 #3
0
 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;
 }