Changeset 2227 for 2011


Ignore:
Timestamp:
2011-06-28 13:52:58 (8 years ago)
Author:
teeevasa
Message:

Talletus.

Location:
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Enemy.cs

    r2206 r2227  
    88public class Enemy : GenCharacter 
    99{ 
    10     public Enemy(double width, double height, Shape shape, int HP) 
     10    private string AItype 
     11    { 
     12        get { return AItype; } 
     13        set { AItype = value; } 
     14    } 
     15 
     16    public Enemy(double width, double height, Shape shape, int HP, string AI) 
    1117        : base(width, height, shape) 
    1218    { 
    1319        hitPoints = HP; 
     20        AItype = AI; 
    1421    } 
    1522} 
     23 
     24// Defines the functions that are required from all AIs 
     25interface AI 
     26{  
     27 
     28} 
     29 
     30/* Implementation of the Patrol-AI 
     31 *     The Patrol-AI just walks back and forth, waiting for the player to come into sight 
     32 *     and then it attacks the player.*/ 
     33public class PatrolAI : AI 
     34{ 
     35 
     36} 
     37 
     38/* Implementation of the Murderer-AI 
     39 *     The Murder-AI, in contrast to the Patrol-AI, actively seeks the player.*/ 
     40public class MurdererAI : AI 
     41{  
     42 
     43} 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Peli.cs

    r2226 r2227  
    99public class Peli : PhysicsGame 
    1010{ 
    11     const int ruudunLeveys = 50; 
    12     const int ruudunKorkeus = 50; 
     11    const int SCREEN_WIDTH = 50; 
     12    const int SCREEN_HEIGTH = 50; 
    1313    Player player; 
    1414 
     
    1717        Gravity = new Vector(0, -1000); 
    1818 
    19         LuoKentta(); 
     19        createLevel(); 
    2020        //lisaaNappaimet(); 
    2121 
     
    2525    } 
    2626 
    27     void LuoKentta() 
     27    void createLevel() 
    2828    { 
    2929        TileMap ruudut = TileMap.FromFile("ReactorEntrance.txt"); 
    30         ruudut['='] = LuoPalikkaH; 
    31         ruudut['|'] = LuoPalikkaV; 
    32         ruudut['P'] = LisääPelaaja; 
    33         ruudut['a'] = LisääMeleeAlien; 
    34         ruudut.Insert(ruudunLeveys, ruudunKorkeus); 
     30        ruudut['='] = createVerticalBlock; 
     31        ruudut['|'] = createHorizontalBlock; 
     32        ruudut['P'] = addPlayer; 
     33        ruudut['a'] = addMeleeAlien; 
     34        ruudut.Insert(SCREEN_WIDTH, SCREEN_HEIGTH); 
    3535    } 
    3636 
     37    void addPlayer() 
     38    { 
     39  
     40    } 
     41 
     42    void addMeleeAlien() 
     43    {  
     44     
     45    } 
     46 
     47    void createHorizontalBlock() 
     48    {  
     49     
     50    } 
     51 
     52    void createVerticalBlock() 
     53    {  
     54     
     55    } 
    3756} 
Note: See TracChangeset for help on using the changeset viewer.