Exemplo n.º 1
0
 void Start()
 {
     GuiLayer             = GlobalOptions.GetGuiLayer();
     playerScript         = GlobalOptions.GetPlayerScript();
     playertransform      = GlobalOptions.GetPlayerScript().singleTransform;
     characterTransform   = playerScript.Character.transform;
     walkingBearTransform = playerScript.GetWalkingBear();
     initEnemy();
 }
Exemplo n.º 2
0
    protected override void Start()
    {
        //transforms
        whereToLookTransform = WhereToLook.transform;
        characterTransform   = Character.transform;
        mainCameraTransform  = MainCamera.transform;
        particlesTransform   = Particles.transform;

        walkingBear          = characterTransform.FindChild("WalkingBear").gameObject;
        walkingBearTransform = walkingBear.transform;
        ////////////

        characterMarioC                 = Character.GetComponent <CharacterMarioC>();
        PlayerFirstPos                  = singleTransform.position;
        CameraFirstPos                  = mainCameraTransform.position;
        CameraFirstRotation             = mainCameraTransform.rotation;
        CharacterFirstPos               = characterTransform.localPosition;
        firstWhereToLookLocalPos        = whereToLookTransform.localPosition;
        raznFromWhereToLookAndCharacter = firstWhereToLookLocalPos - CharacterFirstPos;


        HeadStarsParticleEmitter = GameObject.Find("HeadBoomParticle").GetComponent <ParticleEmitter>();

        GlobalOptions.playerVelocity = startVelocity;
        bearAnimation = Character.GetComponent("BearAnimation3D") as BearAnimation3D;
        bearAnimation.SetWalkSpeed(GetRealVelocityWithNoDeltaTime() / startVelocity);
        force             = 0;
        touchPriority     = 3;
        swallowTouches    = false;
        PathNumber        = 0;
        prevPathNumber    = 0;
        PathChanging      = false;
        VelocityVodka     = 1;
        VelocityHeadStart = 1;
        VelocityPosilka   = 1;
        oldMetersz        = 0;
        oneMeterz         = 0;
        allMeters         = 0;
        flagPosilka       = false;
        flagYahoo         = false;
        timerAltWalk      = Time.time;

        stopTime      = 0;
        startstopTime = 0;

        accelPriority  = 1;
        swallowAcceles = false;

        init();

        guiLayer = GlobalOptions.GetGuiLayer();
        GlobalOptions.gameState                = GameStates.GAME;
        GlobalOptions.playerStates             = PlayerStates.WALK;
        GlobalOptions.playerStatesPathChanging = PlayerStatesPathChanging.FORWARD;
    }
Exemplo n.º 3
0
 public static GuiLayerInitializer GetGuiLayer()
 {
     if (!guiLayerInitializer)
     {
         GameObject vsp = GameObject.Find("/ScreenGame/GUILayer");
         if (vsp == null)
         {
             return(null);
         }
         guiLayerInitializer = vsp.GetComponent <GuiLayerInitializer>();
     }
     return(guiLayerInitializer);
 }
Exemplo n.º 4
0
    public static void FinishTutorial()
    {
        PlayerPrefs.SetInt(TAG + "tutorial", 1);
        MissionEmmitters missionEmmitters = GlobalOptions.GetMissionEmmitters();

        if (missionEmmitters != null)
        {
            missionEmmitters.Init();
        }
        GuiLayerInitializer guiLayer = GlobalOptions.GetGuiLayer();

        if (guiLayer != null)
        {
            guiLayer.upNotifierController.AddTutorialFinihsedNotifier();
            guiLayer.upNotifierController.SetCurrentMissions();
        }
    }