Example #1
0
 // Use this for initialization
 void Start()
 {
     timeLabel = gameObject.GetComponentInChildren<UILabel>();
     god = transform.parent.gameObject.GetComponent<God>();
     colorTween = gameObject.GetComponentInChildren<TweenColor>();
     scaleTween = gameObject.GetComponentInChildren<TweenScale>();
 }
Example #2
0
		internal void SetCurrentGod(God currentGod)
		{
			CurrentGod = currentGod;

			if (OnSetCurrentGod!= null)
				OnSetCurrentGod();
		}
Example #3
0
    void Start ()
    {
        god = GameObject.FindWithTag("GameController").GetComponent<God>();
        myText = GetComponent<Text>();
        Reset();

    }
Example #4
0
    void Start () {
		input = GameObject.FindWithTag ("InputControl").GetComponent<InputControl> ();
		god = GameObject.FindWithTag ("GameController").GetComponent<God> ();
        intensityText = GameObject.Find("Intensity");
        line = gameObject.GetComponent<LineRenderer> ();
		line.enabled = false;
	}
Example #5
0
		public bool IsGodOnAuction(God god)
		{
			if (god == God.Appolon)
				return true;

			return GodsOrder.Contains(god);
		}
Example #6
0
 //private float timeCoefficent;
 // Use this for initialization
 void Start()
 {
     Debug.Log(pointToHit);
     god = (God) FindObjectOfType(typeof(God));
     if (pointToHit.transform.position != Vector3.zero) hitPoint = pointToHit.transform.position;
     else hitPoint = Camera.mainCamera.transform.position;
     Reset();
 }
Example #7
0
    // Use this for initialization
    void Start()
    {
        god = GameObject.FindGameObjectWithTag("God").GetComponent<God>();
        animator = GetComponentInChildren<Animator>();
        character = GetComponentInChildren<ThirdPersonCharacter>();

        m_Cam = Camera.main.transform;
    }
Example #8
0
    public Population MakePopulation(God god, int age)
    {
        var newPop = GameObject.Instantiate(popPrefab) as Population;
        //Give the population a god
        newPop.owner = god;
        newPop.age = age;

        return newPop;
    }
Example #9
0
File: Enemy.cs Project: NoaAka/P6
    //private SimpleSpawner simpleSpawner;//JDebug

	protected void Start() {
		god = GameObject.FindWithTag ("GameController").GetComponent<God> ();
        rb = GetComponent<Rigidbody>();
        player = GameObject.FindWithTag("Player");
        intensityText = GameObject.Find("Intensity");
        scoreText = GameObject.Find("Score");

        //simpleSpawner = GameObject.Find("SimpleSpawner").GetComponent<SimpleSpawner>();//JDebug
    }
 // Use this for initialization
 void Start()
 {
     //playerMaxHealth = startingPlayerHealth;
     playerMaxHealth = PlayerStats.maxHealth;
     playerHealth = playerMaxHealth;
     isDead = false;
     god = FindObjectOfType<God>();
     flincTime = flinchTimeSetValue;
 }
Example #11
0
		public bool GodPossibleToBet(int playerID, God god)
		{
			if (!IsGodOnAuction(god))
				return false;

			if (!God_NotBeatenBet(playerID, god))
				return false;

			return true;
		}
Example #12
0
		public bool God_NotBeatenBet(int playerID, God god)
		{
			if (god == God.Appolon)
				return true;

			Bet bet = GetCurrentBetForPlayer(playerID);
			if (bet != null && god == bet.god)
				return false;

			return true;
		}
 void GoGoGo()
 {
     Started = true;
     GetComponent<SpriteRenderer>().sprite = OnSwitchSprite;
     SwitchedPlatform.SendMessage("StartMoving");
     if (God == null)
     {
         God = GameObject.FindGameObjectWithTag ("God").GetComponent<God>();
     }
     God.Switcherino();
 }
    public void usePowerOnMap(Vector3 point, God godUsingPower)
    {
        //do nothing
        Debug.Log("Using summon shrine power on map!");
            
        var newShrineObj = (GameObject) Object.Instantiate(variableForPrefab, point, Quaternion.Euler(0, Random.Range(0, 360.0f), 0));
        var newShrine = newShrineObj.GetComponent<Shrine>();
        newShrine.god = godUsingPower;

        level.AddShrine(newShrine.GetComponent<Shrine>());
    }
Example #15
0
 public void usePowerOnShrine(Shrine s, God godUsingPower)
 {
     Debug.Log("Using fire power on Shrine!");
     s.cycles = 5;
     s.delay = 2.0f;
     s.burner();
     shrineLoc = s.transform.position;
     curShrine = s;
     // Object.Instantiate((Resources.Load("GodFire")).burner()) as GodPowerFire;
    // this.burner();
 }
Example #16
0
		public Bet GetMaxBetForGod(God god)
		{
			Bet maxBet = null;
			Bets.ForEach((b) =>
				{
					if (b.god == god && (maxBet == null || b.bet > maxBet.bet))
						maxBet = b;
				}
			);
			return maxBet;
		}
Example #17
0
 public List<Shrine> GetShrinesByGod(God g)
 {
     List<Shrine> filtered = new List<Shrine>();
     foreach(Shrine s in shrines)
     {
         if(s.god == g)
         {
             filtered.Add(s);
         }
     }
     return filtered;
 }
Example #18
0
    public void Start()
    {
        godPowerDictionary = new Dictionary<string, GodPower>()
        {
            { "Fire", new GodPowerFire()},
            { "SummonShrine", new GodPowerSummonShrine()},
            {"Sacrifice",new GodPowerSacrifice()  },
            {"Rain",new GodPowerRain()  }

        };

        playerGod = GameObject.Find("Player1").GetComponent<God>();
        terrain = GameObject.Find("landscape_MAP");
    }
Example #19
0
		protected bool CheckGodVariant(God god, AIVariantPackage variants, Context context, PlayerInfoCM player, AIOptions options, out int minBetGold)
		{
			minBetGold = 0;
			if (!context.auction.GodsOrder.Contains(god))
				return false;

			if (!context.auction.GodPossibleToBet(player.ID, god))
				return false;

			AuctionCM.Bet maxBet = context.auction.GetMaxBetForGod(god);
			minBetGold = AuctionCM.GoldForBet(player, (maxBet == null ? 1 : maxBet.bet + 1));
			if (minBetGold > player.Gold)
				return false;

			return true;
		}
Example #20
0
    void Start () {
		input = GameObject.FindWithTag ("InputControl").GetComponent<InputControl> ();
        god = GameObject.FindWithTag("GameController").GetComponent<God>();

        //playerShip 
        playerShip = GameObject.FindGameObjectWithTag("PlayerShip");

        //shield 
        animationController = GetComponentInChildren<AnimationController>();
        playerShield = GameObject.FindGameObjectWithTag("PlayerShield");
        if (shieldPower > 0f)
        {
            ActivateShield();
        }
        else
        {
            DissactivateShield();
        }
    }
Example #21
0
    void Start () {
        enemy = gameObject.GetComponent<God>();
        level = GameObject.Find("LevelManager").GetComponent<Level>();
        terrain = GameObject.Find("landscape_MAP");
        playerGod = GameObject.Find("Player1").GetComponent<God>();
        energy = enemy.energy;
        followers = enemy.followers;
        level = GameObject.Find("LevelManager").GetComponent<Level>();
        godPowerDictionary = new Dictionary<string, GodPower>()
        {
            { "Fire", new GodPowerFire()},
            { "SummonShrine", new GodPowerSummonShrine()},
            {"Sacrifice",new GodPowerSacrifice()  }

        };

        setRandom();//changes its mind
        run();//runs what it wants to do, if it has energy.
    }
Example #22
0
        private void Seed()
        {
            new World() { HeroId = 1, Name = "Davi", UserId = 1 }.Save();
            new World() { HeroId = 2, Name = "Golias", UserId = 2 }.Save();

            God zeus = new God("Zeus",         050, 050, 500, 200, 020, 1, 30); zeus.Save();
            God afrodite = new God("Afrodite",     010, 010, 400, 170, 030, 2, 30); afrodite.Save();

            new God("Odin",         200, 030, 100, 040, 300, 3, 30).Save();
            new God("Valquíria",    100, 100, 100, 100, 100, 4, 40).Save();
            new God("Marte",        090, 150, 200, 030, 200, 5, 30).Save();

            new Unit("Batedor",     05, 05, 05, 20, 04, 1).Save();
            new Unit("Cavaleiro",   01, 01, 40, 17, 04, 2).Save();
            new Unit("Mago",        20, 03, 10, 04, 30, 3).Save();
            new Unit("Infantaria",  10, 10, 10, 10, 10, 4).Save();
            new Unit("Bárbaro",     09, 15, 20, 03, 20, 5).Save();

            new Hero("Asturian", zeus).Save();
            new Hero("Peixes", afrodite).Save();
        }
Example #23
0
        public void update(God god)
        {
            if (Input.GetMouseButtonDown(0))     // 检测点击事件
            {
                RaycastHit hitInfo = new RaycastHit();
                bool       hit     = Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hitInfo);

                if (hit)
                {
                    Debug.Log("CardSelectedState: Hit " + hitInfo.transform.gameObject.name);
                    god.currentplayer.hitobject = hitInfo.transform.gameObject;
                    GameObject hitobject = god.currentplayer.hitobject;

                    if (hitobject.tag == "Slot")      // 选中卡槽
                    {
                        Vector3 SlotPos = hitobject.transform.position;
                        if (hitobject.transform.parent.name == "YellowHeroSlots" && god.currentplayer == god.playeryellow)
                        {
                            god.currentplayer.UseCard(god.currentplayer.SelectedCard, SlotPos);
                        }
                        else if (hitobject.transform.parent.name == "RedHeroSlots" && god.currentplayer == god.playerred)
                        {
                            god.currentplayer.UseCard(god.currentplayer.SelectedCard, SlotPos);
                        }
                        handleState(god, "empty");
                    }
                    else  // 选中其他对象
                    {
                        handleState(god, "empty");
                    }
                }

                else    // 未击中任何物体
                {
                    handleState(god, "empty");
                }
            }
        }
Example #24
0
        public void UpdateGod_ValidObject()
        {
            //Arrange
            var god = new God()
            {
                Idade = 10,
                Nome  = "Zeus"
            };

            var godInserted = this.GodService.Create(god);

            godInserted.Idade = 15;
            godInserted.Nome  = "Afrodite";

            //Act
            var godUpdated = this.GodService.Update(godInserted);

            //Assert
            var getGod = this.GodService.GetByID(godInserted.Id.Value);

            Assert.Equal(getGod.Nome, godUpdated.Nome);
            Assert.Equal(getGod.Idade, godUpdated.Idade);
        }
        protected override string LegendsDescription()
        {
            var timestring = base.LegendsDescription();

            if (!ConcluderHFID.HasValue)
            {
                return(string.Format("{0} {1} aided the {2} {3} in becoming a permanent part of the living world that great fortresses might be raised and tested in siege. " +
                                     "The ritual took place in {4} using {5}",
                                     timestring,
                                     God != null ? God.ToString() : "UNKNOWN",
                                     HF != null ? HF.Race.ToString() : "UNKNOWN",
                                     HF != null ? HF.ToString() : "UNKNOWN",
                                     Site != null ? Site.ToString() : "UNKNOWN",
                                     Artifact != null ? Artifact.ToString() : "UNKNOWN"
                                     ));
            }
            else
            {
                return(string.Format("{0} Agreement formed",
                                     timestring
                                     ));
            }
        }
Example #26
0
        public static int HarmLevel(God self, God other)
        {
            if (self == God.MarsOrDefault || other == God.Mercury || other == God.MarsOrDefault)
            {
                return(1);
            }

            if (other == God.Artemis && self == God.Hephaestos)
            {
                return(2);
            }

            switch ((int)other - (int)self)
            {
            case 0:
                return(0);

            case 1:
                return(2);

            default: return(1);
            }
        }
Example #27
0
    /// <summary>
    /// 玩家从牌库栈顶获得牌,加入手牌中
    /// </summary>
    public void DrawCard()
    {
        int times = 0;

        Debug.Log("Draw Card");
        while (++times < 3 && CardsInHand.Count < 5)
        {
            KeyValuePair <int, Card> CardToDraw = CardStack.Peek();
            CardStack.Pop();
            CardsInHand.Add(CardToDraw);

            //创建手牌时使手牌面向镜头
            GameObject card = GameObject.Instantiate(CardToDraw.Value.CardModel, poscontainer.CardsPos[CardsInHand.Count], Quaternion.Euler(90, 180, 0));
            CardsInHand_Obejct.Add(card);
            card.name = "HeroCard" + CardsInHand.Count.ToString();
            card.tag  = "Card";
        }

        //更新手卡UI
        God god = God.getInstance();

        god.UI.set_player_Cardnum(this.CardsInHand.Count, this);
    }
Example #28
0
        private void InitWeapons(int selectedWeaponId)
        {
            m_weaponList = new List <WeaponDefinition>();
            m_weaponsDropdown.ClearOptions();
            God god = PlayerData.instance.god;

            foreach (int item in PlayerData.instance.weaponInventory)
            {
                if (RuntimeData.weaponDefinitions.TryGetValue(item, out WeaponDefinition value) && value.god == god)
                {
                    m_weaponList.Add(value);
                }
            }
            int value2 = m_weaponList.FindIndex((WeaponDefinition definition) => definition.get_id() == selectedWeaponId);

            if (m_weaponsDropdown != null)
            {
                m_weaponsDropdown.AddOptions((from sd in m_weaponList
                                              select sd.get_displayName()).ToList());
                m_weaponsDropdown.value = value2;
            }
            InitDecks();
        }
Example #29
0
    //parse timer name to add correct energy plant to correct region
    public static void timer_finished(string name)
    {
        //parse timer name
        Debug.Log("build wait finished" + name);
        string[] elements     = name.Split('-');
        string   energy_name  = elements[0];
        int      energy_level = int.Parse(elements[1]);
        string   region       = elements[2];

        // when building is finished reset energy needs
        int[] energy_array    = God.energy_build_energy_increase[energy_name];
        int   energy_increase = energy_array[energy_level];

        God.added_energy_needs -= energy_increase;

        //display notification
        God.notification_title    = "Plant Built";
        God.notification_subtitle = energy_name + " " + energy_level + " built in " + region;
        Notification.show_notification();

        //buy the energy plant
        God.buy_energy_plant(energy_name, energy_level, region);
    }
Example #30
0
    // Update is called once per frame
    void Update()
    {
        if (isGoing)
        {
            // 锁住
            God.getInstance().isFree = false;

            transform.LookAt(endPos);
            transform.Translate(Vector3.forward * speed);
            // 动画机切换到run状态
            animator.SetTrigger("run");
            float distance = (endPos - transform.position).sqrMagnitude;
            if (distance < 2)
            {
                isGoing = false;
                // 动画机切换到attack状态
                animator.ResetTrigger("run");
                animator.SetTrigger("attack");
            }
        }
        if (isComing)
        {
            transform.LookAt(startPos);
            transform.Translate(Vector3.forward * speed);
            float distance = (startPos - transform.position).sqrMagnitude;
            if (distance < 0.02)
            {
                isComing = false;
                // 释放
                God.getInstance().isFree = true;
                // hero回到原位置
                transform.position = startPos;
                // 动画机切换到idle状态
                animator.SetTrigger("idle");
            }
        }
    }
Example #31
0
        public void update(God god)
        {
            if (Input.GetKeyDown(KeyCode.Space))    // 空格键结束回合
            {
                handleState(god, "exchange");
            }
            else if (Input.GetMouseButtonDown(0))       // 检测点击事件
            {
                RaycastHit hitInfo = new RaycastHit();
                bool       hit     = Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hitInfo);

                if (hit)
                {
                    Debug.Log("Hit " + hitInfo.transform.gameObject.name);
                    god.currentplayer.hitobject = hitInfo.transform.gameObject;
                    GameObject hitojbect = god.currentplayer.hitobject;

                    if (god.currentplayer.hitobject.tag == "Hero")      // 选中英雄
                    {
                        god.currentplayer.SelectedHero1 = god.currentplayer.GetHero(god.currentplayer.hitobject);
                        if (null != god.currentplayer.SelectedHero1)   // 选中的是本方英雄
                        {
                            Debug.Log("当前选中英雄为: " + god.currentplayer.SelectedHero1.GetName() + " 生命值为" +
                                      god.currentplayer.SelectedHero1.GetHp() + " 攻击力为" + god.currentplayer.SelectedHero1.GetDamage());

                            handleState(god, "attack");     // 跳转到攻击准备状态
                        }
                    }
                    else if (hitojbect.tag == "Card")
                    {
                        KeyValuePair <int, Card> cardinstance = god.currentplayer.GetCard(hitojbect);
                        god.currentplayer.SelectedCard = cardinstance;
                        handleState(god, "targetselect");
                    }
                }
            }
        }
Example #32
0
    Dictionary <string, Dictionary <string, string> > Unload()
    {
        IPersistantObject[] mapObjects = GetMapPersistantObjects();
        PreSave(mapObjects);
        Level newPlaythroughVersion = new Level(God.GetCurrentLevel());
        Dictionary <string, Dictionary <string, string> > levelState = new Dictionary <string, Dictionary <string, string> >();
        Dictionary <string, Dictionary <string, string> > carrying   = new Dictionary <string, Dictionary <string, string> >();

        foreach (IPersistantObject ip in mapObjects)
        {
            Dictionary <string, string> saved = ip.Save();
            Dictionary <string, string> carry = new Dictionary <string, string>();

            bool shouldAdd = false;
            IEnumerable <string> toPersist  = ip.PersistThroughLoad();
            List <string>        toPersistL = toPersist.ToList();
            foreach (string carriedKey in toPersistL)
            {
                if (saved.ContainsKey(carriedKey))
                {
                    carry.Add(carriedKey, saved[carriedKey]);
                }
                shouldAdd = true;
            }
            carry.Add("type", ip.GetPType().ToString());
            //carry.Add("transform", ip.GetMono().transform.ToSavableString());
            if (shouldAdd)
            {
                carrying.Add(ip.getID(), carry);
            }
        }
        foreach (IPersistantObject ip in mapObjects)
        {
            ip.Unload();
        }
        return(carrying);
    }
Example #33
0
    void TryMoveToNextLevel(Collider2D player)
    {
        Optional <Player> collidedPlayer = Optional <Player> .Of(player.gameObject.GetComponent <Player>());

        Optional <Cat> theCat = God.GetCat(true);

        if (theCat.IsPresent() && collidedPlayer.IsPresent())
        {
            Vector2 dist = theCat.Get().transform.position - collidedPlayer.Get().transform.position;
            if (dist.SqrMagnitude() < GameConstants.MAX_CAT_DIST_FOR_LEVEL_END)
            {
                // I know this is a bandaid, but it fixes a problem that occurs when you carry yarn into a scene that also has yarn in it
                GameObject[] toyBalls = GameObject.FindGameObjectsWithTag("DeleteOnTransition");
                for (int i = 0; i < toyBalls.Length; i++)
                {
//					Debug.Log ("destroy ball");
//					Debug.Log ("length" + (toyBalls [i]).GetComponent<ToyBall>().GetOwner ().Items.Count);
                    if ((toyBalls [i]).GetComponent <ToyBall> ().GetOwner() != null)
                    {
                        (toyBalls [i]).GetComponent <ToyBall> ().GetOwner().Items.Remove(toyBalls [i].GetComponent <ToyBall> ());
                    }
//					Debug.Log ("new length" + (toyBalls [i]).GetComponent<ToyBall>().GetOwner ().Items.Count);
                    Destroy(toyBalls [i]);
                }
                God.GetSavior().TransitionToNewLevel(LevelToLoad, true);
            }
            else
            {
                if (hintToBringCat)
                {
                    God.ShowText(HintsList.HINT_TO_BRING_CAT);
                    hintToBringCat = false;
                }
            }
        }
    }
Example #34
0
    public override IEnumerator Run()
    {
        Player.View.transform.SetParent(Door.View.transform);
        float   timer     = 0;
        Vector3 startPos  = Player.View.transform.localPosition;
        Vector3 endPos    = new Vector3(0, 0, -0.1f);
        Vector3 startSize = Player.View.transform.localScale;
        Vector3 endSize   = new Vector3(0, 0, 1);

        while (timer < 1)
        {
            timer += Time.deltaTime / 0.5f;
            float t = God.Ease(timer, true);
            Player.View.transform.localPosition = Vector3.Lerp(startPos, endPos, t);
            Player.View.transform.localScale    = Vector3.Lerp(startSize, endSize, t);
            Player.View.transform.Rotate(0, 0, 10);
            yield return(null);
        }
        yield return(new WaitForSeconds(0.2f));

        God.Round++;
        //Debug.Log(God.Round);
        SceneManager.LoadScene("Game");
    }
Example #35
0
    public override void OnInspectorGUI()
    {
        God god = (God)target;

        if (GUILayout.Button("Rebuild"))
        {
            god.Rebuild();
        }


        if (GUILayout.Button("Save Current Forms"))
        {
            god.SaveAllForms();
        }


        if (GUILayout.Button("Full Rebuild"))
        {
            god.FullRebuild();
        }


        DrawDefaultInspector();
    }
Example #36
0
 public void UpdateGord(God deus)
 {
     this.godService.Update(deus);
 }
Example #37
0
 public IActionResult CreateGod(God deus)
 {
     return(Ok(this.godService.Create(deus)));
 }
Example #38
0
		internal void MakeBet(int playerID, God god, int bet)
		{
			Bets.RemoveAll((b) => b.playerID == playerID);
			Bet newBet = new AuctionCM.Bet() { bet = bet, god = god, playerID = playerID };
			Bets.Add(newBet);

			if (OnMakeBet != null)
				OnMakeBet(playerID, god, bet);
		}
Example #39
0
 public Action ApplyModifier(God god, Action action)
 {
     return god.punish(action);
 }
Example #40
0
		public AIAuctionVariant(God god, int bet)
		{
			this.god = god;
			this.bet = bet;
		}
        private void OnSelectClick()
        {
            God god = m_fakeData.gods[m_godList.selectedIndex - m_fakeData.godNbElementLockedBefore].god;

            onSelect?.Invoke(god);
        }
Example #42
0
        private void ButtonRegister_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            try {
                bool hasError = false;
                if (TextBoxName.Text == null || TextBoxName.Text == "")
                {
                    TextBoxName.Background = pinkBg;
                    hasError = true;
                }
                else
                {
                    TextBoxName.Background = normalBg;
                }
                if (TextBoxDescription.Text == null || TextBoxDescription.Text == "")
                {
                    TextBoxDescription.Background = pinkBg;
                    hasError = true;
                }
                else
                {
                    TextBoxDescription.Background = normalBg;
                }
                if (StickerNewStricker.StickerImage.Source == Sprite.Get("unknown").Source)
                {
                    LabelTip.Foreground = redBg;
                    hasError            = true;
                }
                else
                {
                    LabelTip.Foreground = new SolidColorBrush(Colors.Black);
                }
                if (hasError)
                {
                    return;
                }
                String imgGuid = Guid.NewGuid().ToString();
                File.Copy(dlg.FileName, Path.Combine(Paths.CustomSpritesDirectory, imgGuid));
                Generics.LinkedList <Sprite> spritesMetadata = JsonConvert.DeserializeObject <Generics.LinkedList <Sprite> >(File.ReadAllText(Paths.CustomSpritesMetadata));
                spritesMetadata.Add(new Sprite()
                {
                    ID       = imgGuid,
                    Path     = imgGuid,
                    IsCustom = true
                });
                File.WriteAllText(Paths.CustomSpritesMetadata, JsonConvert.SerializeObject(spritesMetadata, Formatting.Indented));

                Generics.LinkedList <God> customGods = God.GetAll().Where(x => x.IsCustom).ToLinkedList();

                God newCustomGod = new God()
                {
                    Name        = TextBoxName.Text,
                    Description = TextBoxDescription.Text,
                    ID          = Guid.NewGuid().ToString(),
                    SpriteID    = imgGuid,
                    IsCustom    = true
                };

                fatherName_x_id.TryGetValue(ComboBoxFather.Text, out newCustomGod.FatherID);
                motherName_x_id.TryGetValue(ComboBoxMother.Text, out newCustomGod.MotherID);
                rarityOptions.TryGetValue(ComboBoxRarity.Text, out newCustomGod.Rarity);
                genderOptions.TryGetValue(ComboBoxGender.Text, out newCustomGod.Gender);

                customGods.Add(newCustomGod);

                File.WriteAllText(Paths.CustomGodsMetadata, JsonConvert.SerializeObject(customGods, Formatting.Indented));

                Cache.Clear();
                Cache.Load();
                Cache.DumpLog();

                Game.GameMaster.Player.Inventory.Add(new SimpleSticker()
                {
                    ItemID = newCustomGod.ID
                });

                App.ClientWindow.SetCurrentPage(new StickerRegister_Finished(StickerNewStricker));
            } catch (Exception ex) {
                DebugUtils.LogError("Error creating sticker => " + ex.Message);
            }
        }
Example #43
0
 void Awake()
 {
     if (Kamisama == null)
     {
         DontDestroyOnLoad(gameObject);
         Kamisama = this;
     }
     else if (Kamisama != this)
     {
         Destroy(gameObject);
     }
 }
 public async Task CreateChannel(string id, ChannelModel channel)
 {
     God.CreateChannel(id, channel);
     await Clients.Caller.SendCoreAsync("ChannelCreated", new object[] { channel });
 }
Example #45
0
 // Ensure that the instance is destroyed when the game is stopped in the editor.
 void OnApplicationQuit()
 {
     s_Instance = null;
     if (gameStarted) SaveState();
 }
Example #46
0
		public static Build Get(God god)
		{
			return (Build)Enum.Parse(typeof(Build), god.ToString());
		}
        public God getGodById(int? userId)
        {
            God god = new God();
            god = godDBContext.Gods.FirstOrDefault(g => g.Id == userId);

            return god;
        }
 private void OnGodChangeRequest(God value)
 {
     m_frame.ChangeGodRequest(value);
 }
Example #49
0
 public void PostLoad()
 {
     God.GetStats().SendData();
 }
Example #50
0
 private void OnGodSelected(God god)
 {
     m_god = god;
     GotoSubState(SubState.CharacterSelection, SlidingSide.Right);
 }
Example #51
0
 // Use this for initialization
 void Start()
 {
     god = GameObject.Find("GameManagers").GetComponent <God>();
 }
Example #52
0
 protected void Page_Load(object sender, EventArgs e)
 {
     usernameGot = Request.QueryString["username"];
     this.gridView.DataSource = God.getPropiedades();
     this.gridView.DataBind();
 }
Example #53
0
        public void BuildButton_Click(object sender, EventArgs e)
        {
            godCol  = new GodCollector();
            itemCol = new ItemCollector(MapSelectionList.SelectedValue);

            //Setup for next roll

            //this.GeneralTextBox.Visible = false;

            GeneralTextBox.Text = "Welcome to DankSmite!\nClick the Build button to get a god and a build! C" +
                                  "lick the pictures to reroll them, should you want to do so!\n\n\nWorks for smite ve" +
                                  "rsion: " + SmiteVersion + "\nDanksmite version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString(2);

            //this.GeneralTextBox.Visible = false;
            //this.CurrentItemNameLabel.Text = "";
            RerollNumber.Text = 0.ToString();
            CredsFlag         = false;
            WelcomeFlag       = false;
            DetailsFlag       = false;

            //Making input easier
            GodNameInterpreter();

            //Some dankness

            #region Dank
            if (InputField.Text == "op")
            {
                //_god = new God("Ymir", "g");
                //for (int i = 0; i < 6; i++)
                //{
                //    Build[i] = new Item("Deathbringer", "DeathBringer.png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);
                //}
                //Build[6] = new Item("Blink_Rune", "Blink-Rune-png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);
                //Build[7] = new Item("Blink_Rune", "Blink-Rune-png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);
                //Build[8] = new Item("Deathbringer", "DeathBringer.png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);

                //legalBoots = itemCol.RetrieveLegalBoots(new List<ItemColorType> { ItemColorType.Damage }, GodType.Guardian);
                //legalItems = itemCol.RetrieveLegalItems(new List<ItemColorType> { ItemColorType.Damage }, GodType.Guardian);
                //legalRelics = itemCol.RetrieveLegalRelics();
                //legalStarters = itemCol.RetrieveLegalStarters(new List<ItemColorType> { ItemColorType.Damage }, GodType.Guardian);
            }
            else if (InputField.Text.ToLower() == "trickermand")
            {
                //_god = new God("Ymir", "g");

                //Build[0] = new Item("Shoes_of_the_Magi", "dmg", true, false, false);
                //Build[1] = new Item("Dynasty_Plate_Helm", "hyb", true, false, false);
                //Build[2] = new Item("BreastPlate_of_Valor", "def", true, true, false);
                //Build[3] = new Item("Hide_of_the_Urchin", "def", true, true, false);
                //Build[5] = new Item("Shogun's_Kusari", "dmg", true, false, false);
                //Build[4] = new Item("Obsidian_Shard", "dmg", true, false, false);

                //Build[6] = new Item("Blink_Rune", "dmg", true, true, false);
                //Build[7] = new Item("Magic_Shell", "dmg", true, true, false);
                //Build[8] = new Item("Mark_of_the_Vanguard", "dmg", false, true, false);

                //legalBoots = itemCol.RetrieveLegalBoots(true, true, true, God.godType);
                //legalItems = itemCol.RetrieveLegalItems(true, true, true, God.godType);
                //legalRelics = itemCol.RetrieveLegalRelics(true, true, true, God.godType);
                //legalStarters = itemCol.RetrieveLegalStarters(true, true, true, God.godType);
            }
            else if (InputField.Text.ToLower() == "nazzyc")
            {
                //_god = new God("Medusa", "h");
                //for (int i = 0; i < 6; i++)
                //{
                //    Build[i] = new Item("Odysseus'_Bow", "dmg", false, true, false);
                //}
                //Build[6] = new Item("Bracer_of_Undoing", "def", true, true, false);
                //Build[7] = new Item("Bracer_of_Undoing", "def", true, true, false);
                //Build[8] = new Item("Odysseus'_Bow", "dmg", false, true, false);

                //legalBoots = itemCol.RetrieveLegalBoots(true, true, true, God.godType);
                //legalItems = itemCol.RetrieveLegalItems(true, true, true, God.godType);
                //legalRelics = itemCol.RetrieveLegalRelics(true, true, true, God.godType);
                //legalStarters = itemCol.RetrieveLegalStarters(true, true, true, God.godType);
            }
            else if (InputField.Text.ToLower() == "kloppermand")
            {
                //_god = new God("Ares", "g");

                //Build[0] = new Item("Shoes_of_the_Magi", "dmg", true, false, false);
                //Build[1] = new Item("Void_Stone", "hyb", true, false, false);
                //Build[2] = new Item("Mystical_Mail", "def", true, true, false);
                //Build[3] = new Item("Hide_of_the_Urchin", "def", true, true, false);
                //Build[4] = new Item("Obsidian_Shard", "dmg", true, false, false);
                //Build[5] = new Item("Rod_of_Tahuti", "dmg", true, false, false);

                //Build[6] = new Item("Blink_Rune", "hyb", true, true, false);
                //Build[7] = new Item("Shield_of_Thorns", "def", true, true, false);
                //Build[8] = new Item("Mark_of_the_Vanguard", "def", true, true, false);

                //legalBoots = itemCol.RetrieveLegalBoots(true, true, true, God.godType);
                //legalItems = itemCol.RetrieveLegalItems(true, true, true, God.godType);
                //legalRelics = itemCol.RetrieveLegalRelics(true, true, true, God.godType);
                //legalStarters = itemCol.RetrieveLegalStarters(true, true, true, God.godType);
            }
            #endregion

            //Validation of proper input
            else if (!((AssassinCheckbox.Checked == false &&
                        this.GuardianCheckbox.Checked == false &&
                        this.HunterCheckbox.Checked == false &&
                        this.MageCheckbox.Checked == false &&
                        this.WarriorCheckbox.Checked == false) ||
                       (this.DamageCheckbox.Checked == false &&
                        this.DefenseCheckbox.Checked == false &&
                        this.HybridCheckbox.Checked == false)))
            {
                if (string.IsNullOrEmpty(InputField.Text))
                {
                    FullRebuild(CreateItemTypeListFromCheckBoxes(), CreateGodTypeListFromCheckBoxes());
                }
                else
                {
                    FullRebuild(InputField.Text, CreateItemTypeListFromCheckBoxes());
                }
            }
            else
            {
                _god = new God("Ymir", GodType.Guardian, "Ymir.png");
                for (int i = 0; i < 6; i++)
                {
                    Build[i] = new Item("Deathbringer", "DeathBringer.png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);
                }
                Build[6] = new Item("Blink_Rune", "Blink-Rune-png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);
                Build[7] = new Item("Blink_Rune", "Blink-Rune-png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);
                Build[8] = new Item("Deathbringer", "DeathBringer.png", GodType.Guardian, ItemColorType.Damage, MapTypes.Joust);

                legalBoots = itemCol.RetrieveLegalBoots(new List <ItemColorType> {
                    ItemColorType.Damage
                }, GodType.Guardian);
                legalItems = itemCol.RetrieveLegalItems(new List <ItemColorType> {
                    ItemColorType.Damage
                }, GodType.Guardian);
                legalRelics   = itemCol.RetrieveLegalRelics();
                legalStarters = itemCol.RetrieveLegalStarters(new List <ItemColorType> {
                    ItemColorType.Damage
                }, GodType.Guardian);
            }

            //Sets labels
            //this.StarterItemLabel.Visible = true;
            //this.RelicLabel1.Visible = true;
            //this.RelicLabel2.Visible = true;
            //this.ItemLabel1.Visible = true;
            //this.ItemLabel2.Visible = true;
            //this.ItemLabel3.Visible = true;
            //this.ItemLabel4.Visible = true;
            //this.ItemLabel5.Visible = true;
            //this.ItemLabel6.Visible = true;
            //clickedRebuild = true;

            Draw();
        }
Example #54
0
		public List<Bet> GetOrderedGodBets(God god)
		{
			IEnumerable<Bet> godBets = from bet in Bets
										orderby bet.bet
										where bet.god == god
										select bet;
			return godBets.ToList();
		}
Example #55
0
 public void Unload()
 {
     God.Kill(this.gameObject);
 }
Example #56
0
    public void CreateGod(Tile[,] tiles, bool isPlayer, string godName, int MaxMovement, int attackRange, int attackStregnth, int health)
    {
        // Create and assign variables to God unit
        GameObject GodGo = Instantiate(God);
        God        g     = new God(godName);

        GodGo.GetComponent <UnitObjectScript>().setUnit(g);
        g.assignGameObject(GodGo);

        //TODO, don't know exactly how we're handling this
        g.setWorshiperCount(0);
        g.setMorale(1);


        g.MaxMovement    = MaxMovement;
        g.attackRange    = attackRange;
        g.AttackStrength = attackStregnth;
        g.WorshiperCount = health;

        if (isPlayer)
        {
            BoardMan.playerUnits.Add(g);
            g.isPlayer = true;
            g.setAbilities(gameInfo.PlayerFaction.Abilities);
            g.MoveTo(new Vector2(-1, -1), tiles);
            g.unitGameObject().transform.position = new Vector3(0, MapMan.godFloatHeight, MapMan.tiles.GetLength(1) / 2);

            // Load the 3D model
            GameObject godModel;

            try
            {
                godModel = Instantiate(Resources.Load("Gods/" + gameInfo.PlayerFaction.Type.ToString(), typeof(GameObject))) as GameObject;
            }
            catch (Exception e)
            {
                godModel = Instantiate(Resources.Load("Gods/Mushrooms", typeof(GameObject))) as GameObject;
            }

            godModel.transform.SetParent(g.unitGameObject().transform);
            godModel.transform.position = new Vector3(GodGo.transform.position.x, GodGo.transform.position.y + godModel.GetComponent <GroundOffset>().groundOffset,
                                                      GodGo.transform.position.z + godModel.GetComponent <GroundOffset>().zOffset);

            GodGo.GetComponent <CapsuleCollider>().center = new Vector3(0, godModel.GetComponent <GroundOffset>().colliderCenter, 0);

            GodGo.GetComponent <CapsuleCollider>().height = godModel.GetComponent <GroundOffset>().colliderHeight;

            //Face east
            g.turnToFace(3);

            g.AllowAct();
        }
        else
        {
            BoardMan.enemyUnits.Add(g);
            g.EndAct();
            g.isPlayer = false;
            g.setAbilities(gameInfo.EnemyFaction.Abilities);
            g.MoveTo(new Vector2(-1, -1), tiles);
            g.unitGameObject().transform.position = new Vector3(MapMan.tiles.GetLength(0), MapMan.godFloatHeight, MapMan.tiles.GetLength(1) / 2);

            GameObject godModel;

            try
            {
                godModel = Instantiate(Resources.Load("Gods/" + gameInfo.EnemyFaction.Type.ToString(), typeof(GameObject))) as GameObject;
            }
            catch (Exception e)
            {
                godModel = Instantiate(Resources.Load("Gods/Mushrooms", typeof(GameObject))) as GameObject;
            }

            godModel.transform.SetParent(g.unitGameObject().transform);
            godModel.transform.position = new Vector3(GodGo.transform.position.x, GodGo.transform.position.y + godModel.GetComponent <GroundOffset>().groundOffset,
                                                      GodGo.transform.position.z + godModel.GetComponent <GroundOffset>().zOffset);

            GodGo.GetComponent <CapsuleCollider>().center = new Vector3(0, godModel.GetComponent <GroundOffset>().colliderCenter, 0);

            GodGo.GetComponent <CapsuleCollider>().height = godModel.GetComponent <GroundOffset>().colliderHeight;

            //Face west
            g.turnToFace(1);
        }
    }
 public override void PopulateFromJson(JObject jsonObject)
 {
     this.PopulateFromJson(jsonObject);
     m_god             = (God)Serialization.JsonTokenValue <int>(jsonObject, "god", 0);
     m_precomputedData = PrecomputedData.FromJsonProperty(jsonObject, "precomputedData");
 }
Example #58
0
 void Start()
 {
     gameScript = FindObjectOfType <God>();
 }
Example #59
0
    private void Start()
    {
        welcomePhrase = "when the sun sets over the nile, mummies start to roam the land of the pyramids \n.......";
        Egypt         = this.GetComponent <AudioSource>();
        if (!GameManager.getIsCompleted())
        {
            GameManager.ReceiveSavedData();
            welcomePanel.SetActive(true);
            typing = welcomePanel.GetComponent <AudioSource>();
            StartCoroutine(showText(welcomePhrase, welcomeText, typing));
        }
        else
        {
            Egypt.Play();
        }
        GroupID = GameManager.getGroupID();
        GameManager.createGods();
        if (GroupID > 0)
        {
            myGod = GameManager.getGodInfo(GroupID);
        }
        revealPanel.SetActive(false);
        factionPanel.SetActive(false);
        nextPanel.SetActive(false);

        if (GameManager.getInitial() == 0)
        {
            factionButton.SetActive(false);
            infoButton.SetActive(false);
            IndexObject.SetActive(false);
        }
        else
        {
            factionButton.SetActive(true);
            infoButton.SetActive(true);
            IndexObject.SetActive(true);
            IndexObject.GetComponentInChildren <TextMeshProUGUI>().text = GameManager.getName(int.Parse(GameManager.getIndexNo())) + "\n" + GameManager.getIndexNo();
            if (GameManager.getGender(int.Parse(GameManager.getIndexNo())) == 'F')
            {
                profPic.sprite = FemaleProfPic;
            }
            else
            {
                profPic.sprite = MaleProfPic;
            }
            switch (GroupID)
            {
            case 1:
                godSprite = Horus;
                break;

            case 2:
                godSprite = Bastet;
                break;

            case 3:
                godSprite = Osiris;
                break;

            case 4:
                godSprite = Anubis;
                break;
            }
        }
    }
Example #60
0
 public override void Create()
 {
     god = (God)parent;
     //    print( Cycles );
     Cycles.Clear();
     if (framer != null)
     {
         SafePrepend(framer);
     }
     if (journey != null)
     {
         SafePrepend(journey);
     }
     if (tween != null)
     {
         SafePrepend(tween);
     }
     if (textParticles != null)
     {
         SafePrepend(textParticles);
     }
     if (cameraControls != null)
     {
         SafePrepend(cameraControls);
     }
     if (playerControls != null)
     {
         SafePrepend(playerControls);
     }
     if (inputEvents != null)
     {
         SafePrepend(inputEvents);
     }
     if (sceneCircle != null)
     {
         SafePrepend(sceneCircle);
     }
     if (book != null)
     {
         SafePrepend(book);
     }
     if (gpuCollisions != null)
     {
         SafePrepend(gpuCollisions);
     }
     if (guideParticles != null)
     {
         SafePrepend(guideParticles);
     }
     if (monolithParticles != null)
     {
         SafePrepend(monolithParticles);
     }
     if (sourceParticles != null)
     {
         SafePrepend(sourceParticles);
     }
     if (extraParticles != null)
     {
         SafePrepend(extraParticles);
     }
     if (tiler != null)
     {
         SafePrepend(tiler);
     }
     if (terrainTap != null)
     {
         SafePrepend(terrainTap);
     }
     if (state != null)
     {
         SafePrepend(state);
     }
     if (painter != null)
     {
         SafePrepend(painter);
     }
     if (helper != null)
     {
         SafePrepend(helper);
     }
     if (sharedMeshes != null)
     {
         SafePrepend(sharedMeshes);
     }
     if (sound != null)
     {
         SafePrepend(sound);
     }
     if (land != null)
     {
         SafePrepend(land);
     }
     if (reincarnator != null)
     {
         SafePrepend(reincarnator);
     }
 }