//bool isStrafing = false;

    //bool canStrafe = false;



    // Use this for initialization
    void Start()
    {
        //AI Start
        CurrentAIState = AIMode.StartMovement;

        canFire = true;


        CurEShield = MaxEShield;


        GameObject playerShip = GameObject.Find("PlayerShip");

        PlayerShipCtrl = playerShip.GetComponent <ShipPlayerController>();



        //ChooseMovement();



        //axis = transform.right;

        //startPos = transform.position;


        StartCoroutine(Firing());


        StartCoroutine(CoastForward());
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        GameObject playerShip = GameObject.Find("PlayerShip");

        ParentShip = playerShip.GetComponent <ShipPlayerController>();

        GetComponent <AudioSource>().PlayOneShot(shotSfxClip);

        ShotParticleRenderer.enabled = true;
    }
    // Use this for initialization
    void Start ()
    {
        axis = transform.right;
        // Set the life-span until our object is destroyed
        Destroy(gameObject, 10.0f);
        // Find the player ship game object by name
        GameObject playerShip = GameObject.Find("PlayerShip");
        // Access the player ship's script component by type
        PlayerShipCtrl = playerShip.GetComponent<ShipPlayerController>();
	}
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        //movestate
        CurrentMoveState = AIMode.Normal;

        GetComponent <Collider>().name = subTypeName;

        //playership component
        GameObject playerShip = GameObject.Find("PlayerShip");

        PlayerShipCtrl = playerShip.GetComponent <ShipPlayerController>();
    }
    // Use this for initialization
    void Start()
    {
        axis = transform.right;

        //Set the life-span until our object is destroyed.
        Destroy(gameObject, 3.0f);
        // Find the player ship game object name
        GameObject playerShip = GameObject.Find("PlayerShip");
        // Access the player ship's script component by type
        if (playerShip.activeInHierarchy)
        {
            ParentShip = playerShip.GetComponent<ShipPlayerController>();
        }
    }
    // Use this for initialization
    void Start()
    {
        //AI Start
        CurrentAIState = AIMode.Normal;


        GameObject playerShip = GameObject.Find("PlayerShip");

        PlayerShipCtrl = playerShip.GetComponent <ShipPlayerController>();



        //axis = transform.right;
    }
Esempio n. 7
0
    // Use this for initialization
    void Start()
    {
        //AI Start
        CurrentAIState = AIMode.Normal;



        GameObject playerShip = GameObject.Find("PlayerShip");

        PlayerShipCtrl = playerShip.GetComponent <ShipPlayerController>();

        //ChooseMovement();



        //startPos = transform.position;

        StartCoroutine(Firing());
    }
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag ("GameController");
        if (gameControllerObject != null)
        {
            gameController = gameControllerObject.GetComponent <GameController>();
        }
        if (gameController == null)
        {
            Debug.Log ("Cannot find 'GameController' script");
        }

        GameObject playerObject = GameObject.FindWithTag ("Player");
        if (playerObject != null)
        {
            playerController = playerObject.GetComponent <ShipPlayerController>();
        }
        if (playerController == null)
        {
            Debug.Log ("Cannot find 'ShipPlayerController' script");
        }
    }
Esempio n. 9
0
    void Start()
    {
        gameOver = false;
        restart = false;
        restartText.text = "";
        gameOverText.text = "";
        score = 0;
        UpdateScore ();
        level = 1;

        StartCoroutine(SpawnWaves ());

        if (player != null) {
            playerController = player.GetComponent <ShipPlayerController> ();
        }
        if (playerController == null)
        {
            Debug.Log ("Cannot find 'ShipPlayerController' script");
        }
    }