public void DestroyObject(Collider key, ThrowableObjectClass obj) { foreach (Collider col in obj.GetAllCollider()) this.CurrentObjectInstantiate.Remove(col); this.freeObject.Add(obj); if (obj.PlayerWhoThrow != null) obj.PlayerWhoThrow.DropObject(obj); obj.Destroy(); }
public void DropObject(ThrowableObjectClass obj) { this.CurrentObject = obj; }
public void ThrowObject(ThrowableObjectClass obj) { obj.myObject.transform.parent = handEmpty.transform; obj.myObject.transform.localPosition = Vector3.zero; obj.myObject.transform.localRotation = Quaternion.Euler(340, 180, 180); obj.Initialize(this); if (this.CurrentObject != null) this.CurrentObject.Drop(); this.CurrentObject = obj; }