Example #1
0
    void Awake()
    {
        levelManager=GameObject.Find("Managers").GetComponent<LB_LevelManager>();
        movementManager=GameObject.Find("Managers").GetComponent<LB_MovementManager>();
        maxComp=GameObject.Find("MAX").GetComponent<LB_MaxComp>();

        levelManager.SetAsDemo();
        maxComp.SetStartPosition(5,3,0);
        levelManager.AddObstaculo(new LB_Obstaculo(5,5,1));
        levelManager.AddSolucion(new LB_Solucion(5,7,0));
    }
Example #2
0
    void Start()
    {
        levelManager = GameObject.Find("Managers").GetComponent<LB_LevelManager>();
        start=false;
        GetComponent<Animation>().Stop();
        moveZ=0.0;
        moveY=0.0;
        moveX=0.0;
        dirAct=Const.DIR_DOWN;
        movimientos= new List<int>();
        index=0;
        //speed=1.5;
        angulo=0;
        totalRotation=0;
        actionTime=timeLightAction;
        isPlaying=false;

        GetComponent<Animation>()[Const.ANIM_FLIP].wrapMode=WrapMode.Once;
        GetComponent<Animation>()[Const.ANIM_JUMP].wrapMode=WrapMode.Once;
        GetComponent<Animation>()[Const.ANIM_WALK].wrapMode=WrapMode.Loop;
        GetComponent<Animation>()[Const.ANIM_IDLE].wrapMode=WrapMode.Once;
        //animation.CrossFade(Const.ANIM_JUMP);
        //animation.CrossFade(Const.ANIM_WALK);
        //animation.CrossFade(Const.ANIM_FLIP);
        //animation.CrossFade(Const.ANIM_IDLE);
    }
 // Use this for initialization
 void Start()
 {
     lbManager=GameObject.Find("Managers").GetComponent<LB_LevelManager>();
     max=GameObject.Find("MAX").GetComponent<LB_MaxComp>();
     GenerateLevel(currentLevel++);
 }