예제 #1
0
 void Awake()
 {
     TheBaseStar = this.gameObject.GetComponent<BaseStar>();
     PlentifulResources = new List<string>();
     ScarceResources = new List<string>();
     Aspects = new List<string>();
 }
    void Awake()
    {
        RollTheDice = GameObject.Find("Dice").GetComponent<RollDice>();
        TheBaseStar = this.gameObject.GetComponent<BaseStar>();
        TheBaseStellarType = this.gameObject.GetComponent<BaseStellarType>();

        PlentifulResources = new List<string>();
        ScarceResources = new List<string>();
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        newGuidingStar = new BaseStar();
        newearthIsland = new BaseIslandOfEarth();

        gameObject.name = newearthIsland.IslandName;
        starManager = GameObject.FindGameObjectWithTag ("Star_Manager").GetComponent<SkyStars>();

        starManager.CreateGuide (newGuidingStar.StarObject, gameObject.transform, gameObject.name, newearthIsland.IslandBaseColor);
    }
예제 #4
0
        private static void passionsTest()
        {
            var passionList = new List <IPassion>();
            var david       = new BaseStar(passionList);

            david.Name = "David";

            var passionCats = new BasePassion();

            passionCats.PassionValue = 10;
            passionCats.PassionName  = "Cats";

            passionCats.Thresholds.Add(new BaseThreshold("Cat-like affinity", "Your burgeoning love for cats has allowed for this bonus to manifest.", 10));
            passionCats.Thresholds.Add(new BaseThreshold("Cat-like reflexes", "Your reflexes are no longer like that of a dead cat. More like a live one. Or something like that.", 20));
            passionCats.Thresholds.Add(new BaseThreshold("Dog-like affinity", "Your burgeoning love for dogs has brough this burden on you.", -10));

            passionCats.Likes.Add(PassionValue.Cats);
            passionCats.Hates.Add(PassionValue.Dogs);

            david.Passions.Add(passionCats);

            Console.WriteLine("David before event.");
            foreach (var thresh in passionCats.ThresholdsHit())
            {
                Console.WriteLine(thresh);
            }

            var actionListener = new ActionListener();

            actionListener.ManagedPassions.Add(david.Passions.First());
            actionListener.FireEvent(PassionValue.Dogs, 10);

            Console.WriteLine("David after event.");
            foreach (var thresh in passionCats.ThresholdsHit())
            {
                Console.WriteLine(thresh);
            }

            Console.ReadKey();
        }
예제 #5
0
 void Awake()
 {
     this.gameObject.GetComponent<SgtCustomStarfield>().Stars [0].Color = ClassTcolor;
     TheBaseStar = this.gameObject.GetComponent<BaseStar>();
     TheBaseSpectralClass = this.gameObject.GetComponent<BaseSpectralClass>();
 }
예제 #6
0
 void Awake()
 {
     RollTheDice = GameObject.Find("Dice").GetComponent<RollDice>();
     TheBaseStar = GetComponentInParent<BaseStar>();
     TheBasePlanetarySystem = this.gameObject.GetComponent<BasePlanetarySystem>();
     TheBaseCivilization = this.gameObject.GetComponent<BaseCivilization>();
 }
예제 #7
0
 void Awake()
 {
     TheBaseStar = this.gameObject.GetComponent<BaseStar>();
 }
 void Awake()
 {
     TheBaseStar = this.gameObject.GetComponent<BaseStar>();
     TheBaseStellarType = this.gameObject.GetComponent<BaseStellarType>();
 }
 void Awake()
 {
     Aspects = new List<string>();
     RollTheDice = GameObject.Find("Dice").GetComponent<RollDice>();
     TheBaseStar = GetComponentInParent<BaseStar>();
     TheBasePlanetarySystem = this.gameObject.GetComponent<BasePlanetarySystem>();
     TheSliderSetting = Mathf.FloorToInt(GameObject.Find("Slider").GetComponent<SliderController>().TheValue);
 }
 void Awake()
 {
     Aspects = new List<string>();
     SatelliteTypes = new List<string>();
     RollTheDice = GameObject.Find("Dice").GetComponent<RollDice>();
     TheBaseStar = GetComponentInParent<BaseStar>();
     BiosphereModifier = TheBaseStar.BiosphereModifier;
     TheSliderSetting = Mathf.FloorToInt(GameObject.Find("Slider").GetComponent<SliderController>().TheValue);
 }
예제 #11
0
        private static void villageTest()
        {
            BaseVillage testVillage = new BaseVillage();

            testVillage.VillageName = "Test Town";

            List <IStar> stars = new List <IStar>();

            var david = new BaseStar();

            david.Name = "David";

            var passionCats = new BasePassion();

            passionCats.PassionValue = 10;
            passionCats.PassionName  = "Cats";

            passionCats.Thresholds.Add(new BaseThreshold("Cat-like affinity", "Your burgeoning love for cats has allowed for this bonus to manifest.", 10));
            passionCats.Thresholds.Add(new BaseThreshold("Cat-like reflexes", "Your reflexes are no longer like that of a dead cat. More like a live one. Or something like that.", 20));
            passionCats.Thresholds.Add(new BaseThreshold("Dog-like affinity", "Your burgeoning love for dogs has brough this burden on you.", -10));

            passionCats.Likes.Add(PassionValue.Cats);
            passionCats.Hates.Add(PassionValue.Dogs);

            david.Passions.Add(passionCats);

            //-------------------------------untested----------------------------------------------------//
            var trent = new BaseStar();

            trent.Name = "Trent";

            var passionNoodles = new BasePassion();

            passionNoodles.PassionName  = "Noodles";
            passionNoodles.PassionValue = 15;

            passionNoodles.Thresholds.Add(new BaseThreshold("Noodle liker", "Your love of noodles is beginning to become hard to contain", 10));
            passionNoodles.Thresholds.Add(new BaseThreshold("Noodle connoisseur", "Only the greatest of noodles can satiate your tastes", 50));
            passionNoodles.Thresholds.Add(new BaseThreshold("Rice lover", "Not a sex thing... probably", -25));

            trent.Passions.Add(passionNoodles);

            var testBoy = new BaseStar();

            testBoy.Name = "Testy";

            var passionTest = new BasePassion();

            passionTest.PassionName  = "Testing";
            passionTest.PassionValue = 10;

            passionTest.Thresholds.Add(new BaseThreshold("Testing affinity", "You can test like a tester", 5));
            passionTest.Thresholds.Add(new BaseThreshold("Testing Mastery", "Testing with the best of them", 50));

            testBoy.Passions.Add(passionTest);

            // actual village testing

            // PassionManager seems like a good name?
            var passionManager = new ActionListener();

            passionManager.ManagedPassions.Add(passionCats);
            passionManager.ManagedPassions.Add(passionNoodles);
            passionManager.ManagedPassions.Add(passionTest);

            // Add the stars, and shoot for them
            testVillage.Stars.Add(trent);
            testVillage.Stars.Add(david);
            testVillage.Stars.Add(testBoy);

            Console.WriteLine("Village setup complete");

            Console.WriteLine("Village before testing");
            Console.WriteLine(testVillage.ToString());

            // Now do some stuff to the stars.
            passionManager.FireEvent(PassionValue.Cats, 20);

            Console.WriteLine("Village after testing");
            Console.WriteLine(testVillage);

            Console.ReadLine();
        }