public void SetMode(ActionMode m) { if (m == ActionMode.KINEMATIC) { myActionManager = gameObject.AddComponent <MyActionManager>() as MyActionManager; } else if (m == ActionMode.PHYSICS) { physicsActionManager = gameObject.AddComponent <PhysicsActionManager>() as PhysicsActionManager; } actionMode = m; }
public void SetPhysicsAM(PhysicsActionManager pam) { PhysicsAM = pam; }
public int mode = 0; // 0->normal, 1->physics public ActionManagerAdapter(GameObject main) { normalAM = main.AddComponent <ActionManager>(); PhysicsAM = main.AddComponent <PhysicsActionManager>(); mode = 0; }
public void Start() { flyActionManager = (FlyActionManager)gameObject.AddComponent <FlyActionManager>(); physicsActionManager = (PhysicsActionManager)gameObject.AddComponent <PhysicsActionManager>(); }