private IndividualGameController AddPlayer() { var game = Instantiate(gamePrefab); IndividualGameController gg = game.GetComponent <IndividualGameController>(); game.transform.position = new Vector3(xPos, 0f, 0f); xPos += sceneHeight; return(gg); }
internal void Repair(Actionable actionable, IndividualGameController individualGameController) { timeRepairing += Time.deltaTime; Debug.Log(Time.deltaTime); spawnSparks(); if (timeRepairing >= actionable.secondsForRepairing) { individualGameController.repairCrack(this.gameObject); timeRepairing = 0; } }
private void Start() { attackerGame = AddPlayer(true); myGame = AddPlayer(); targetGame = AddPlayer(false); }
// Start is called before the first frame update void Start() { ragdollController = this.GetComponentInParent <RagdollController>(); joint = transform.GetComponent <DistanceJoint2D>(); individualGameController = GetComponentInParent <IndividualGameController>(); }