public Color m_Color;                                           // カラー

    // Use this for initialization
    void Start()
    {
        m_CharacterController = GetComponent <CharacterController>();
        m_Animator            = GetComponent <Animator>();
        m_Player = GetComponent <Player>();

        m_ControllerCamera = GameObject.Find("Main Camera").GetComponent <ControllerCamera>();
        m_GoalSmoothMove   = GameObject.Find("Main Camera").GetComponent <GoalSmoothMove>();
    }
Ejemplo n.º 2
0
 void Awake()
 {
     master = this;
 }
Ejemplo n.º 3
0
 private void UpdateTranslation(ControllerCamera camera)
 {
     Transform2 transform = _translator.GetTransform();
     Transform2 camT = camera.GetWorldTransform();
     transform.Size = camT.Size * translationScaleOffset;
     _translator.SetTransform(transform);
 }
Ejemplo n.º 4
0
        public void LevelCreate()
        {
            //SceneStop();
            SetTool(null);
            Renderer.RemoveLayer(Hud);
            Renderer.RemoveLayer(Level);
            Hud = new Scene();
            Level = new EditorScene(Renderer);
            Renderer.AddLayer(Level);
            Renderer.AddLayer(Hud);

            selection = new Selection(Level);
            StateList = new StateList();

            CamControl = new ControllerCamera(this, Input, Level);
            Transform2.SetSize(CamControl, 10);
            Hud.SetActiveCamera(CamControl);
            Level.ActiveCamera = CamControl;

            LevelCreated(this, null);
            LevelChanged(this, null);
            TimeChanged(this, Level.Time);
        }
Ejemplo n.º 5
0
    //private List<GameObject> enemiesPositions;
    void Awake()
    {
        sceneName = "Level 0";
        popUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();
        controllerDino = new ControllerDino(dino, BarraDeFome, 2);
        BarraDeFome.maxValue = dino.GetComponent<DataObjectDino>().InitialFome;

        controllercamera = new ControllerCamera(dino);
        gamepad = gameObject.AddComponent<Gamepad>();
        gamepad.SetController (controllerDino);

        //enemiesPositions = new List<GameObject>(GameObject.FindGameObjectsWithTag("Enemy"));
        //for(int i=0;i<enemiesPositions.Count;i++)
        foreach(GameObject enemy in new List<GameObject>(GameObject.FindGameObjectsWithTag("Spawner")))
        {
            EventsObjects.Add(enemy.name, enemy);
        }

        controllerPauseOptions = new ControllerPauseOptions();
        gamepad = gameObject.AddComponent<Gamepad>();
        gamepad.SetController (controllerPauseOptions);
    }