Exemplo n.º 1
0
    void Awake()
    {
        pause = pauseButton.GetComponent <Pause>();

        createPlatform = gameObject.GetComponent <CreatePlatform>();

        left    = Left.transform.rotation;
        right   = Right.transform.rotation;
        towards = Towards.transform.rotation;

        animator = GetComponent <Animator>();
    }
Exemplo n.º 2
0
    void Awake()
    {
        pause = pauseButton.GetComponent<Pause>();

        createPlatform = gameObject.GetComponent<CreatePlatform>();

        left = Left.transform.rotation;
        right = Right.transform.rotation;
        towards = Towards.transform.rotation;

        animator = GetComponent<Animator>();
    }
Exemplo n.º 3
0
    public void Init()
    {
        engine = GetComponent <CharacterInputController>();
        engine.refreshDitance = new CharacterInputController.RefreshDistance(RefreshDistance);
        ui_controller         = GetComponent <CharacterUIController>();
        controlGame           = GameObject.Find("GameControl").GetComponent <ControlGame>();
        startPos = transform.position;

        MapControl mapControl = GameObject.Find("MapControl").GetComponent <MapControl>();

        createPlatform = mapControl.CreatePlatform;
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        instance   = this;
        currentPos = transform.position;

        float step = Mathf.Sqrt(2) * 0.5f;

        stepRight = new Vector3(step, 0, step);
        stepLeft  = new Vector3(step * (-1), 0, step);

        GlobalValue.levelPathLeft = GlobalValue.levelPlaying;

        listPath         = new List <GameObject> ();
        randomPathLength = Random.Range(7, 11); //first path
        CreatePath();                           //create first path on start
    }
Exemplo n.º 5
0
    private void Update()
    {
        if (freezePlayerState)
        {
            return;
        }

        currentState.Update(this);

        IfDebugActivateSlowMotion();
        UpdateFacingSprite();
        PositionWalkParticles();
        if (!isDying)
        {
            CheckIfHasResetDashTrigger();
            shield.CheckShieldInput();
            CreatePlatform.CheckCreateInput(this);
            CreatePlatform.CheckDeleteInput(this);
        }
    }