public void LaunchCGObject(CGThrowableObject obj, Vector3 direction, float power) { CGPhysicsObject physicsObj = new CGPhysicsObject(obj, direction, power, this.m_worldSetter); WorldSetter.ECubeArea eCubeArea = this.m_worldSetter.GetCubeAreaEnum(physicsObj.throwableObject.transform.position); Vector3 startGravity = this.m_cubeAreaGravity[(uint)eCubeArea]; physicsObj.throwableObject.SetCubeAreaGravity(startGravity); this.m_objects.Add(physicsObj); }
public CGPhysicsObject(CGThrowableObject o, Vector3 d, float p, WorldSetter ws) { WorldSetter.ECubeArea ae = ws.GetCubeAreaEnum(o.transform.position); this.ePreviousArea = ae; this.eCurrentArea = ae; this.eTargetArea = WorldSetter.ECubeArea.NONE; this.eObjectState = EObjectState.OBJECT_LAUNCH_TRIGGER; this.throwableObject = o; this.objectRigidBody = this.throwableObject.GetComponent <Rigidbody>(); this.launchDirection = d; this.launchPower = p; this.isAreaChanged = false; }