public override void Update(LevelTime levelTime, CircleSprite arenaCircle, ArenaCamera camera, bool confineCursorToScreen) { UpdatePosition(levelTime, arenaCircle, camera, confineCursorToScreen); heartIterator.Update(levelTime); UpdateInvincibility(levelTime); }
// Start is called before the first frame update void Start() { nukeStuckBall = GameControl.gameControl.matchSettings.nukeStuckBall; if (GameControl.gameControl.matchSettings.matchType == 0) { isTimeMatch = true; remainingTimeText = remainingTimeGameObject.GetComponent <TextMeshProUGUI>(); remainingTimeGameObject.SetActive(true); remainingGameTimeInSeconds = GameControl.gameControl.matchSettings.duration * 60; } else { isTimeMatch = false; goalsToWin = GameControl.gameControl.matchSettings.goalsToWin; } goals = new int[playerCount]; Array.Clear(goals, 0, goals.Length); machinesScript = GameObject.Find("Machines").GetComponent <Machines>(); ballScript = GameObject.Find("Ball").GetComponent <Ball>(); ball = GameObject.FindGameObjectWithTag("Ball"); GameObject courtGameObject = GameObject.Find("Court"); court = courtGameObject.GetComponent <Court>(); GameObject cameraGameObject = GameObject.Find("Camera"); arenaCamera = cameraGameObject.GetComponent <ArenaCamera>(); audioSource = GetComponent <AudioSource>(); goalBackground = goalBackgroundGameObject.GetComponent <UnityEngine.UI.Image>(); goalLabel = goalLabelGameObject.GetComponent <UnityEngine.UI.Image>(); goalLabelRectTransform = goalLabelGameObject.GetComponent <RectTransform>(); winnerText = gameOverGameObject.transform.GetChild(1).GetComponent <Text>(); loserText = gameOverGameObject.transform.GetChild(2).GetComponent <Text>(); goalTexts = new TextMeshProUGUI[goalTextGameObjects.Length]; int i = 0; foreach (GameObject goalTextGameObject in goalTextGameObjects) { goalTexts[i++] = goalTextGameObject.GetComponent <TextMeshProUGUI>(); } ballRigidbody = ball.GetComponent <Rigidbody>(); }
void Awake() { instance = this; arenaCamera = FindObjectOfType <ArenaCamera>(); }
protected override void UpdatePosition(LevelTime levelTime, CircleSprite arenaCircle, ArenaCamera camera, bool confineCursorToScreen) { positionIterator.Update(levelTime); }