// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // load enemy speed _enemySpeed = _varHandler._enemySpeed; }
// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Load the text element _hackerPoints = GetComponent<Text>(); }
// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Invoke generation InvokeRepeating("GenerateMojo", 5f, 5f); }
// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Set instance health _instanceHealth = _varHandler._enemyHealth; }
// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Agent prefab types _enemyPrefab = new GameObject[1]; _enemyPrefab[0] = _enemyHacker; InvokeRepeating("spawncycle", 1f, 1f); }
// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Save the initial position _initialPosition = transform.position; // Set projectile speed _projectileSpeed = 5; }
// Use this for initialization void Start () { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Set agent type _instanceAgentType = _varHandler._agentType; // Set the instance health _instanceHealth = _varHandler._agentHealth[_instanceAgentType]; // initially not taking damage _takingDamage = false; }
void Start() { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Start tower as not shooting _shooting = false; // Set agent type _instanceAgentType = _varHandler._agentType; Shoot ( ); }
void Start() { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); // Create an array of 2 to store the agent prefabs in _agentPrefabs = new GameObject[3]; // Load the regular agent into the first array slot _agentPrefabs[0] = _regularAgent; // Load the corporate agent into the second array slot _agentPrefabs[1] = _corporateAgent; // Load the generator into the second array slot _agentPrefabs[2] = _generator; }
void Start() { // Find the ground GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent <VariableHandler>(); // Create an array of 2 to store the agent prefabs in _agentPrefabs = new GameObject[3]; // Load the regular agent into the first array slot _agentPrefabs[0] = _regularAgent; // Load the corporate agent into the second array slot _agentPrefabs[1] = _corporateAgent; // Load the generator into the second array slot _agentPrefabs[2] = _generator; }
public override VariableValue Evaluate(IVariableStore variables) { var result = Right.Evaluate(variables); var value = VariableHandler.Add(result, VariableValue.Create(-1)); if (value.IsEmpty) { throw TypeMismatch(result.Type); } if (Right is IAssignableOperation assignable) { assignable.SetValue(variables, value); return(value); } else { throw new ExpressionEvaluationException(_invalidAssignmentException, Right); } }
public void BackToMenu() { GameObject variableObject = GameObject.FindGameObjectWithTag("VariableHandler"); VariableHandler variableHandler = variableObject.GetComponent <VariableHandler>(); GameObject scoreObject = GameObject.FindGameObjectWithTag("Score"); ScoreController scoreController = scoreObject.GetComponent <ScoreController>(); GameObject managerObject = GameObject.FindGameObjectWithTag("GameManager"); GameManager gameManager = managerObject.GetComponent <GameManager>(); if (GameObject.FindGameObjectWithTag("Lives")) { GameObject livesObject = GameObject.FindGameObjectWithTag("Lives"); LivesController livesController = livesObject.GetComponent <LivesController>(); } variableHandler.endlessMode = gameManager.endless; //variableHandler.savedScore = scoreController.score; //variableHandler.savedLives = livesController.lives; //variableHandler.savedLevel = gameManager.levelNumber; SceneManager.LoadScene("MainMenu"); }
public IEnumerator NextLevel() { yield return(new WaitForSeconds(0.05f)); if (!GameObject.FindGameObjectWithTag("Brick")) { Destroy(ball.transform.parent.gameObject); yield return(new WaitForSeconds(1)); levelNumber++; if (levelNumber <= finalLevel) { brickController.SetUpBricks(levelNumber); StartCoroutine(paddleController.SpawnNewBall()); } else { if (!endless) { Debug.Log("YOU WON!"); VariableHandler variableHandler = variableObject.GetComponent <VariableHandler>(); GameObject scoreObject = GameObject.FindGameObjectWithTag("Score"); ScoreController scoreController = scoreObject.GetComponent <ScoreController>(); variableHandler.finalScore = scoreController.score; variableHandler.winner = true; SceneManager.LoadScene("GameOver"); gameOver = true; } else { brickController.SetUpBricks(finalLevel); StartCoroutine(paddleController.SpawnNewBall()); } } } }
public void OnAfterDeserialize() { Value = VariableHandler.LoadValue(ref _data, ref _objects); }
public void OnBeforeSerialize() { _data = VariableHandler.SaveValue(Value, ref _objects); }
void Start ( ) { GameObject theGround = GameObject.Find("Ground"); // Load the vriable handle of the ground into a local variable _varHandler = theGround.GetComponent<VariableHandler>(); }
public VariableValue GetValue(IVariableStore variables, VariableValue owner) { var left = Left is ILookupOperation lookup?lookup.GetValue(variables, owner) : VariableValue.Empty; return(left.IsEmpty ? left : VariableHandler.Cast(left, _rightIdentifier.Name)); }
public static Parameter CreateVariableParameter(string name, Type type, object defaultValue, VariableHandler handler) { Parameter p = new Parameter(); p.type = type; p.isFixed = false; p.name = name; p.defaultValue = defaultValue; System.Diagnostics.Debug.Assert(handler != null); p.handler = handler; return(p); }
private void Start() { GameObject variableObject = GameObject.FindGameObjectWithTag("VariableHandler"); variableHandler = variableObject.GetComponent <VariableHandler>(); }
public static VariableValue DrawEmpty(Rect position) { var type = (VariableType)EditorGUI.EnumPopup(position, VariableType.Empty); return(VariableHandler.CreateDefault(type, null)); }