コード例 #1
0
 static void AddLocomotion(GameObject obj, Locomotions type)
 {
     switch (type)
     {
     case Locomotions.Walk:
         obj.AddComponent <WalkMovement>();
         break;
     }
 }
コード例 #2
0
    static void AddLocomotion(GameObject obj, Locomotions type)
    {
        switch (type)
        {
        case Locomotions.Walk:
            obj.AddComponent <WalkMovement>();
            break;

        case Locomotions.Fly:
            //obj.AddComponent<FlyMovement>();
            break;

        case Locomotions.Teleport:
            //obj.AddComponent<TeleportMovement>();
            break;
        }
    }