当前位置: 首页>>代码示例>>C#>>正文


C# GameMaster类代码示例

本文整理汇总了C#中GameMaster的典型用法代码示例。如果您正苦于以下问题:C# GameMaster类的具体用法?C# GameMaster怎么用?C# GameMaster使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GameMaster类属于命名空间,在下文中一共展示了GameMaster类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MouseClicked

        public void MouseClicked(int x, int y, GameMaster sender)
        {
            Rectangle mouseClickRect = new Rectangle(x, y, 10, 10);

            //int resumeWidth = resumeButton.Width / 2;
            //int resumeHeight = resumeButton.Height / 2;

            Rectangle resumeButtonRect = new Rectangle(screenCenter.X - (resumeButton.Width / 2), 400, resumeButton.Width, resumeButton.Height);

            //int quitGameWidth = quitGameButton.Width / 2;
            //int quitGameHeight = quitGameButton.Height / 2;

            Rectangle quitGameButtonRect = new Rectangle(screenCenter.X - (quitGameButton.Width / 2), 500, quitGameButton.Width, quitGameButton.Height);

            if (mouseClickRect.Intersects(resumeButtonRect))
            {
                sender.gameState = PacManMulti.GameMaster.GameState.Playing;
                sender.restart = false;
                sender.isPaused = false;
            }
            else if (mouseClickRect.Intersects(quitGameButtonRect))
            {
                sender.gameState = PacManMulti.GameMaster.GameState.StartMenu;
                sender.restart = true;
                sender.isPaused = false;
            }
        }
开发者ID:EphemeralGeek,项目名称:Pacman,代码行数:27,代码来源:Pause.cs

示例2: Awake

 void Awake()
 {
     if (!gm)
     {
         gm = GameObject.FindGameObjectWithTag ("GM").GetComponent<GameMaster>();
     }
 }
开发者ID:BlueReelProductions,项目名称:2D-Platformer,代码行数:7,代码来源:GameMaster.cs

示例3: ProcessCommand

    public override void ProcessCommand(GameMaster gameMaster, string username, string parameters)
    {
        GameObject playerObj = gameMaster.GetPlayerObject(username);
        if (playerObj.activeSelf == false)
        {
            GetComponent<TwitchIRC>().MessageChannel("@" + username + ", can't cast spells when you're dead");
            return;
        }

        if (parameters.Length == 0)
        {
            Team otherTeam = gameMaster.GetOpposingTeam(playerObj.GetComponent<Player>().team);
            otherTeam.TakeDamage(damage);

            CreateZot(playerObj, otherTeam.gameObject);
        }
        else
        {
            GameObject target = gameMaster.GetPlayerObject(parameters);
            if (target != null)
            {
                CreateZot(playerObj, target);
                target.GetComponent<Player>().DealDamage(damage);
            }
        }
    }
开发者ID:vvega,项目名称:PewPewWars,代码行数:26,代码来源:Zot.cs

示例4: Start

 // Use this for initialization
 void Start()
 {
     if (gameMaster == null)
     {
         gameMaster = GameObject.FindGameObjectWithTag("GM").GetComponent<GameMaster>();
     }
 }
开发者ID:DevoutChaos,项目名称:SEng_GrpProject-WiP-,代码行数:8,代码来源:GameMaster.cs

示例5: Start

 // Use this for initialization
 void Start()
 { 
     anim = GetComponent<Animator>();
     rb = GetComponent<Rigidbody2D>();
     soundHandler = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<GameMaster>();
     //GetComponent<Animator>().SetBool("IsIdle", true);
 }
开发者ID:kt-chin,项目名称:GGJ2016,代码行数:8,代码来源:PlayerMovement.cs

示例6: Start

 void Start()
 {
     defaultfarClipPlane = camera.farClipPlane;
     gameMaster = (GameMaster)GetComponent(typeof(GameMaster));
     gameMaster.isSurface.Subscribe(this.OnSurface);
     OnSurface(false);
 }
开发者ID:IlyaBokovenko,项目名称:spear-fishing,代码行数:7,代码来源:WaterEffects.cs

示例7: Start

    // Use this for initialization

    void Start()
    {
        spellAnimation = GetComponent<Animator>() as Animator;
        audioReference = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<GameMaster>();
        playerMove = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerMovement>();
        //castingSpell = false;
    }
开发者ID:kt-chin,项目名称:GGJ2016,代码行数:9,代码来源:ComboSystem.cs

示例8: Awake

    public void Awake ()
	{
        GM = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<GameMaster>();
		pathUnit = GetComponent<PathfindingUnit>();
        player = GetComponent<Player>();
		
	}
开发者ID:mbucher,项目名称:Raid_My_Vault,代码行数:7,代码来源:InputManager.cs

示例9: Start

 // Use this for initialization
 void Start()
 {
     gameMaster = Camera.main.GetComponent<GameMaster> ();
     playerControl = Camera.main.GetComponent<PlayerControl> ();
     stats = Camera.main.GetComponent<Statistics> ();
     source = Camera.main.GetComponent<AudioSource> ();
 }
开发者ID:NikMifsud,项目名称:GreatSiege,代码行数:8,代码来源:SpawnSiege.cs

示例10: Start

 void Start()
 {
     if (gm == null) {
         gm = GameObject.FindGameObjectWithTag ("GM").GetComponent<GameMaster> ();
     }
     playerScript = player.GetComponent<Player>();
 }
开发者ID:sacert,项目名称:Beat-The-Boss,代码行数:7,代码来源:GameMaster.cs

示例11: Start

    // Use this for initialization
    void Start()
    {
        GetComponent<Button>().interactable = false;

        gameMaster = GameMaster.instance;
        stats = GameObject.Find("Stats").GetComponent<StatsInterface>();
    }
开发者ID:PhilippeRheaume,项目名称:Hackaton_Expedia,代码行数:8,代码来源:SubMenuButton.cs

示例12: Start

 // Use this for initialization
 void Start()
 {
     playerControl = Camera.main.GetComponent<PlayerControl> ();
     source = Camera.main.GetComponent<AudioSource> ();
     gameMaster = Camera.main.GetComponent<GameMaster> ();
     timer = 45;
 }
开发者ID:NikMifsud,项目名称:GreatSiege,代码行数:8,代码来源:HealthPowerUps.cs

示例13: Start

 // Use this for initialization
 void Start()
 {
     timer = 90;
     attackTimer = 0;
     playerControl = Camera.main.GetComponent<PlayerControl> ();
     gameMaster = Camera.main.GetComponent<GameMaster> ();
     source = Camera.main.GetComponent<AudioSource> ();
 }
开发者ID:NikMifsud,项目名称:GreatSiege,代码行数:9,代码来源:IncreasedAttack.cs

示例14: ProcessCommand

    public override void ProcessCommand(GameMaster gameMaster, string username, string parameters)
    {
        GameObject playerObj = gameMaster.GetPlayerObject(username);
        if (playerObj == null)
            return;

        playerObj.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(Random.Range(0, Screen.width), Random.Range(0, Screen.height), 10));
    }
开发者ID:vvega,项目名称:PewPewWars,代码行数:8,代码来源:NewPosition.cs

示例15: Awake

	void Awake()
	{
		GM = GameMaster.GM;
		deathSequence = GetComponent<DeathSequence>();
		healthManager = GetComponent<HealthManager>();


	}
开发者ID:mbucher,项目名称:Raid_My_Vault,代码行数:8,代码来源:Entity.cs


注:本文中的GameMaster类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。