Exemple #1
0
        // PUBLIC FUNCTIONS
        public void AddResource(Resource resource, string target)
        {
            Actor actor = FindActor(target);

            if (actor != null)
                actor.AddResource(resource);
        }
Exemple #2
0
        public void AddResource(Resource resource, string target)
        {
            //GameManager.DebugLog("Game add resource to" + " :: " + target);

            Actor actor = FindActor(target);

            if (actor != null) {
                actor.AddResource(resource);

                GameManager.DebugLog ("Adding " + resource.Name + " to " + actor.Name);
            }
        }
Exemple #3
0
        // atualiza o jogo
        public void Update(int rule_index)
        {
            running_phase.Update ();

            //Debug.Log (running_ruleset.phase_iterator);
            if ((running_phase.Enabled == false) || (running_phase.IsFinished == true)){// if the phase ended or was disabled

                NextPhase(); // loads the next phase in the list
            }

            // TEMP

            CGME.Player player = game.GetPlayer("Human Player");
            CGME.Resource<int> life = new Resource<int>();

            //player = game.GetPlayer("Human Player");
            life = (CGME.Resource<int>)player.GetResource("Life Points");

            if (life.Value != lastvalue){
                Debug.Log (player.Name + " hit points: " + life.Value);
                lastvalue = life.Value;
            }
        }