Inheritance: iThinkLibrary.iThinkAction
コード例 #1
0
 /// Action generator
 /// @todo Implement lookup table or a design pattern for easier/automatic function generation
 public void actionGenerator( List<GameObject[]> combinations )
 {
     iThinkAction action;
     //printEverything(combinations);
     foreach ( GameObject[] matrix in combinations )
     {
       			switch ( schemaElements[0] )
         {
             case "get" :
                 action = new Get( "Get", matrix[0], matrix[1] );
                 tempActionList.Add(action);
                 break;
             case "buy" :
                 action = new Buy( "Buy", matrix[0], matrix[1], matrix[2] );
                 tempActionList.Add(action);
                 break;
             case "store" :
                 action = new Store( "Store", matrix[0], matrix[1]);
                 tempActionList.Add(action);
                 break;
             case "hunt" :
                 action = new Hunt( "Hunt", matrix[0], matrix[1], matrix[2], matrix[3]);
                 tempActionList.Add(action);
                 break;
             case "make" :
                 action = new Make( "Make", matrix[0], matrix[1], matrix[2]);
                 tempActionList.Add(action);
                 break;
             case "harvest" :
                 action = new Harvest( "Harvest", matrix[0], matrix[1], matrix[2]);
                 tempActionList.Add(action);
                 break;
             case "produce" :
                 action = new Produce( "Produce", matrix[0], matrix[1], matrix[2]);
                 tempActionList.Add(action);
                 break;
             case "craftSpell" :
                 action = new CraftSpell ("CraftSpell", matrix[0], matrix[1], matrix[2]);
                 tempActionList.Add(action);
                 break;
             case "craftSimpleWeapon" :
                 action = new CraftSimpleWeapon("CraftSimpleWeapon", matrix[0], matrix[1], matrix[2]);
                 tempActionList.Add(action);
                 break;
         }
     }
 }
コード例 #2
0
ファイル: GameState.cs プロジェクト: pebblecode/hangover-hunt
 public static void RestartHunt()
 {
     currentHunt = new Hunt();
 }
コード例 #3
0
ファイル: DetectTarget.cs プロジェクト: Orihaus/Obsolete
    void Start()
    {
        SearchCooldown = SearchCooldownRate;

        idle = GetComponent<Idle>();
        rotate = GetComponent<AIRotate>();
        hunt = GetComponent<Hunt>();
        if( GetComponent<Predation>() ) pred = GetComponent<Predation>();

           // StartCoroutine( SearchForTarget() );
        Targetify( SecondaryTarget );
    }