本文整理汇总了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;
}
}
示例2: Awake
void Awake()
{
if (!gm)
{
gm = GameObject.FindGameObjectWithTag ("GM").GetComponent<GameMaster>();
}
}
示例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);
}
}
}
示例4: Start
// Use this for initialization
void Start()
{
if (gameMaster == null)
{
gameMaster = GameObject.FindGameObjectWithTag("GM").GetComponent<GameMaster>();
}
}
示例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);
}
示例6: Start
void Start()
{
defaultfarClipPlane = camera.farClipPlane;
gameMaster = (GameMaster)GetComponent(typeof(GameMaster));
gameMaster.isSurface.Subscribe(this.OnSurface);
OnSurface(false);
}
示例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;
}
示例8: Awake
public void Awake ()
{
GM = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<GameMaster>();
pathUnit = GetComponent<PathfindingUnit>();
player = GetComponent<Player>();
}
示例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> ();
}
示例10: Start
void Start()
{
if (gm == null) {
gm = GameObject.FindGameObjectWithTag ("GM").GetComponent<GameMaster> ();
}
playerScript = player.GetComponent<Player>();
}
示例11: Start
// Use this for initialization
void Start()
{
GetComponent<Button>().interactable = false;
gameMaster = GameMaster.instance;
stats = GameObject.Find("Stats").GetComponent<StatsInterface>();
}
示例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;
}
示例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> ();
}
示例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));
}
示例15: Awake
void Awake()
{
GM = GameMaster.GM;
deathSequence = GetComponent<DeathSequence>();
healthManager = GetComponent<HealthManager>();
}