Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Q))
     {
         // Generate Grid
         context.GenerateGrid();
     }
     if (Input.GetKeyDown(KeyCode.W))
     {
         // Add/create Player
         context.AddPlayerUnit();
     }
     if (Input.GetKeyDown(KeyCode.E))
     {
         // Add Debug Unit
         context.AddUnit(GameObject.Instantiate(DebugMonsterUnitPrefab).GetComponent <UnitScript>());
     }
 }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Q))
     {
         // Generate Grid
         gameContext.GenerateGrid();
     }
     if (Input.GetKeyDown(KeyCode.W))
     {
         // Add/create Player
         gameContext.AddPlayerUnit();
     }
     if (Input.GetKeyDown(KeyCode.E))
     {
         // Add Debug Unit
         gameContext.AddUnit(GameObject.Instantiate(DebugUnitPrefab).GetComponent <UnitScript>());
     }
     if (Input.GetKeyDown(KeyCode.Space))
     {
         // TODO aherrera : functionality to trigger a debug "mini-game" event
         MGManager.instance.AddMG();
     }
 }