Example #1
0
    protected override void Start()
    {
        base.Start();

        state = GetComponent <WalkingState> ();

        if (state == null)
        {
            state = this.gameObject.AddComponent <WalkingState> ();
        }

        state.Construct();

        camMotor = gameObject.AddComponent <CameraMotor> ();
        camMotor.Init();
        camTransform = camMotor.CameraContainer;

        audioClips.Add(ARBlast);
        audioClips.Add(HGBlast);
        audioClips.Add(SGBlast);
        audioClips.Add(SwingSword);
        for (int i = 0; i < 14; i++)
        {
            GameObject go = Instantiate(placeParticle, wayPointObject.position, wayPointObject.rotation) as GameObject;
            go.SetActive(false);
            placeParticles.Add(go);
        }

        GameMasterObject.heroes.Add(transform);
    }
Example #2
0
    protected override void Start()
    {
        base.Start();

        cameraMotor = gameObject.AddComponent <CameraMotor>();
        cameraMotor.Init();
        cameraTransform = cameraMotor.CameraContainer;
    }
    protected override void Start()
    {
        base.Start();

        state = gameObject.AddComponent<WalkingState>();
        state.Construct();

        camMotor = gameObject.AddComponent<CameraMotor>();
        camMotor.Init();
        camTransform = camMotor.CameraContainer;
    }
Example #4
0
    protected override void Start()
    {
        base.Start();

        // Put walking state on player and then create it
        state = gameObject.AddComponent <WalkingState> ();
        state.Construct();

        camMotor = gameObject.AddComponent <CameraMotor> ();
        camMotor.Init();
        camTransform = camMotor.CameraContainer;
    }