コード例 #1
0
ファイル: Game.cs プロジェクト: Rainermv/CGM
        // PUBLIC FUNCTIONS
        public void AddResource(Resource resource, string target)
        {
            Actor actor = FindActor(target);

            if (actor != null)
                actor.AddResource(resource);
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: Rainermv/CGM
        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);
            }
        }
コード例 #3
0
ファイル: GameManager.cs プロジェクト: Rainermv/CGM
        // 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;
            }
        }