Пример #1
0
 private void Awake()
 {
     _lady    = FindObjectOfType <Lady>();
     _icon    = FindObjectOfType <Icon>();
     _control = FindObjectOfType <GameControl>();
     _walk    = FindObjectOfType <WalkEvent>();
 }
Пример #2
0
 public void Awake()
 {
     _lady    = FindObjectOfType <Lady>();
     _icon    = FindObjectOfType <Icon>();
     _drink   = FindObjectOfType <DrinkEvent>();
     _control = FindObjectOfType <GameControl>();
 }
 private void Awake()
 {
     _lady    = FindObjectOfType <Lady>();
     _icon    = FindObjectOfType <Icon>();
     _control = FindObjectOfType <GameControl>();
     _fatigue = FindObjectOfType <FatigueEvent>();
 }
Пример #4
0
    static void Main()
    {
        Lady[] ladies = new Lady[5];

        ladies[0] = new Lady()
        {
            name = "Alice", num = 5
        };
        ladies[1] = new Lady()
        {
            name = "Bella", num = 4
        };
        ladies[2] = new Lady()
        {
            name = "Christina", num = 3
        };
        ladies[3] = new Lady()
        {
            name = "Dorothy", num = 2
        };
        ladies[4] = new Lady()
        {
            name = "Emma", num = 1
        };
    }
Пример #5
0
 private void populateEvents()
 {
     //EXAMPLE_EVENT();
     events.Add(Homeless.stealingFood(characters["Homeless"]));
     events.Add(Lady.childTantrum(characters["Lady"]));
     events.Add(Child.childTantrum(characters["Child"]));
     events.Add(Creep.creepRoam(characters["Creep"]));
     return;
 }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Person Tom = new Person();  //類別實體化成物件

        //設定Tom欄位值基本資料
        Tom.lastName  = "Tom";
        Tom.firstName = "Hans";
        Tom.height    = 175;
        Tom.weight    = 65;
        Tom.age       = 40;
        Tom.gender    = true;

        //將Tom的資料顯示出來
        Response.Write("<H2>Tom的基本資料</H2>");
        Response.Write(String.Format("LastName:{0}<BR/>", Tom.lastName));
        Response.Write(String.Format("FirstName:{0}<BR/>", Tom.firstName));
        Response.Write(String.Format("年齡:{0}歲<BR/>", Tom.age));
        Response.Write(String.Format("身高:{0}cm<BR/>", Tom.height));
        Response.Write(String.Format("體重:{0}Kg<BR/>", Tom.weight));
        Response.Write(String.Format("性別:{0}<BR/>", (Tom.gender == true ? "男" : "女")));

        Lady Mary = new Lady();

        //設定Mary欄位值基本資料
        Mary.lastName  = "Mary";
        Mary.firstName = "Wang";
        Mary.height    = 165;
        Mary.weight    = 48;
        Mary.age       = 25;
        Mary.gender    = false;
        Mary.Hobby     = "唱歌";

        //將Mary的資料顯示出來
        Response.Write("<H2>Mary的基本資料</H2>");
        Response.Write(String.Format("LastName:{0}<BR/>", Mary.lastName));
        Response.Write(String.Format("FirstName:{0}<BR/>", Mary.firstName));
        Response.Write(String.Format("年齡:{0}歲<BR/>", Mary.age));
        Response.Write(String.Format("身高:{0}cm<BR/>", Mary.height));
        Response.Write(String.Format("體重:{0}Kg<BR/>", Mary.weight));
        Response.Write(String.Format("性別:{0}<BR/>", (Mary.gender == true ? "男" : "女")));
        Response.Write(String.Format("興趣:{0}<BR/>", (Mary.gender == true ? "男" : "女")));
    }
Пример #7
0
 public BespectacledLady(Lady p) : base(p.Name + ", в очках", p)
 {
 }
Пример #8
0
 public LadyWithHat(Lady p) : base(p.Name + ", в шляпе", p)
 {
 }
Пример #9
0
        public void Setup()
        {
            //Items

            Item belt    = new Item("Belt", "Phew! This thing stinks like all getout. Why couldn't the Kerrek have kidnapped a hot wench or something that you could have saved?", "You claim the Kerrek's cool belt as your trophy. It stinks just like him! You start to miss him, a little.");
            Item robe    = new Item("Robe", "A vintage peasant robe! Just like grampa used to wear, and the only remaining posession from your burninated cottage. Stylishly smouldering.", @"It's still burning - now you'll LOOK like a peasant and be ON FIRE like a peasant. 
The fires of vengeance that burn in your heart help you ignore the pain from the literal flames on the robe.");
            Item sword   = new Item("Sword", "The TrogSword is for real. Hands-down the coolest item in the game. You can't wait to lop off that beefy arm of Trogdor's with this guy.", @"Something tells you this is a good idea and you lob the little one into the lake.
You won't be arrested after all! The little guy has resurfaced safely, carrying a sword. 
You take the sword - Way to go, baby! 
Baby Dashing keeps on crawling headed off to a new life. 
He becomes Valedictorian of his graduating class, goes to Scalding Lake State, gets a degree in Advanced Peasantry and lands a job at Thatch-Pro: building better cottages for a better tomorrow.
You grow apart and the letters from him become fewer and fewer. 
He develops a severe mead problem and blames you for never being there.");
            Item trinket = new Item("Trinket", "This trinket is weird. It looks like it can either kill you or make you the hit of your Christmas party.", "You reach into the bush to snag you some berries but instead find a Super Trinket! These things are awesome! You have a sneaking suspicion that SOMEONE in this game will need this thing.");
            Item map     = new Item("Map", "A map of Peasantry. The only remaining posession from your burninated cottage.", "");
            Item shirt   = new Item("Shirt", "This has got to be your favorite T-shirt ever. Oh, the times you had at Scalding Lake. Canoeing, fishing, stoning heathens. What a Blast!", "");

            //Things


            //Rooms
            KerrekDomain   a1 = new KerrekDomain();
            PeacefulMeadow a2 = new PeacefulMeadow();
            PeasantCottage a3 = new PeasantCottage();
            PebbleLake     b1 = new PebbleLake();
            MountainPass   b2 = new MountainPass();
            YourCottage    b3 = new YourCottage();

            //Characters
            Kerrek kerrek = new Kerrek();
            Knight knight = new Knight();
            Lady   lady   = new Lady();

            a1.AddCharacter(kerrek);
            b2.AddCharacter(knight);
            a3.AddCharacter(lady);

            //Relationships
            //automatically adds other half of relationship(East-West, North-South)
            b1.AddDirection("west", a1);
            a1.AddDirection("south", a2);
            b2.AddDirection("west", a2);
            a2.AddDirection("south", a3);
            b3.AddDirection("west", a3);
            b1.AddDirection("south", b2);
            b2.AddDirection("south", b3);


            //Add Items to Areas
            // a1.AddItem(belt);
            a2.AddItem(trinket);
            b3.AddItem(robe);
            b1.AddItem(sword);

            //Player Init
            CurrentPlayer = new Player("Rather Dashing");
            CurrentPlayer.Inventory.Add(shirt);

            //starting position
            CurrentArea = b2;
        }
Пример #10
0
 void Awake()
 {
     instance = this;
 }
Пример #11
0
 private void Awake()
 {
     _lady = FindObjectOfType <Lady>();
     _icon = FindObjectOfType <Icon>();
 }
Пример #12
0
 protected LadyDecorator(string name, Lady lady) : base(name)
 {
     Lady = lady;
 }
Пример #13
0
 private void Awake()
 {
     _lady      = FindObjectOfType <Lady>();
     _setSprite = GetComponent <SpriteRenderer>();
 }