Example #1
0
 void Awake()
 {
     //Debug.Log(PlayerModule.Instance().unlockLevelList.Count);
     // Init Select Panel
     if (PlayerModule.Instance().unlockLevelList.Count > 0)
     {
         if (PlayerModule.Instance().unlockLevelList.Contains(MainBehaviour.startScene))
         {
             selectPanel.ShowBeachIcon();
         }
         if (PlayerModule.Instance().unlockLevelList.Contains(MainBehaviour.forestScene))
         {
             selectPanel.ShowForestIcon();
         }
         if (PlayerModule.Instance().unlockLevelList.Contains(MainBehaviour.caveScene))
         {
             selectPanel.ShowCaveIcon();
         }
         if (PlayerModule.Instance().unlockLevelList.Contains(MainBehaviour.townScene))
         {
             selectPanel.ShowTownIcon();
         }
         if (PlayerModule.Instance().unlockLevelList.Contains(MainBehaviour.alleyScene))
         {
             selectPanel.ShowAlleyIcon();
         }
         selectPanel.SetPathSprite("select_path" + PlayerModule.Instance().unlockLevelList.Count);
     }
 }
Example #2
0
        public static void OnLoad()
        {
            var processes = Process.GetProcessesByName("csgo");

            while (processes.Length == 0)
            {
                Console.WriteLine(@"Waiting for csgo to start");
                if (processes.Length == 1)
                {
                    break;
                }
            }

            while (ClientDll == null || EngineDll == null)
            {
                var sharp = new MemorySharp(processes[0]);
                ClientDll = sharp.Modules.RemoteModules.FirstOrDefault(f => f.Name == "client.dll");
                EngineDll = sharp.Modules.RemoteModules.FirstOrDefault(f => f.Name == "engine.dll");
            }

            Entities    = new EntitesModule();
            LocalPlayer = new PlayerModule();
            Crosshair   = new CrosshairModule();
            Memory      = new MemorySharp(processes[0]);
        }
        public LevelStatusGump(Mobile owner) : base(50, 50)
        {
            PlayerMobile pm     = owner as PlayerMobile;
            PlayerModule module = pm.PlayerModule;

            AddPage(0);
            AddBackground(0, 0, 230, 380, 2620);
            AddBackground(20, 20, 190, 30, 9300);
            AddLabel(44, 26, 1153, "Level and Age Status");

            AddBackground(20, 70, 190, 30, 9350);
            AddLabel(30, 75, 1150, "Current Exp : " + (( PlayerModule )module).Experience + "");
            AddBackground(20, 120, 190, 30, 9350);
            AddLabel(30, 125, 1150, "Current Level : " + (( PlayerModule )module).Level + "");
            AddBackground(20, 170, 190, 30, 9350);
            AddLabel(30, 175, 1150, "Current Rank : " + (( PlayerModule )module).RankPoints + "");
            AddBackground(20, 220, 190, 30, 9350);
            AddLabel(30, 225, 1150, "Your Age : " + (( PlayerModule )module).Age + "");
            AddBackground(20, 270, 190, 30, 9350);
            AddLabel(30, 275, 1150, "Current Skill Pts : " + (( PlayerModule )module).SkillPts + "");

            AddItem(24, 315, 8784, 1175);
            AddItem(154, 315, 8785, 1175);
            AddItem(58, 317, 3937, 1172);
            AddItem(82, 317, 3936, 1172);
            AddLabel(134, 351, 102, "Gump by Andy");

            AddButton(11, 357, 10006, 10006, 1, GumpButtonType.Reply, 1);
            AddLabel(27, 353, 1150, "Refresh");
        }
Example #4
0
//	public static BattleManager getInstance(){
//		return instance;
//	}
//



    public void spawnPlayer()
    {
        GameObject o = GameObject.Instantiate(playerPrefab, mapObjLayer);

        player = o.GetComponent <PlayerModule> ();

        battleMainCamera.GetComponent <TargetFollower> ().Target = o.transform;

        MapManager.getInstance().spawnPlayer(player.gl);
        player.gl.updatePosImmediately();

        string heroName = "hero" + ((PlayerData.getInstance().heroIdx + 1) + "").PadLeft(2, '0');
        AnimatorOverrideController animCtrl = Resources.Load("OverrideAnimCtrl/player/" + heroName) as AnimatorOverrideController;

        o.GetComponentInChildren <Animator>().runtimeAnimatorController = animCtrl;

        Vector3 point = player.transform.position;

        if (point.x < 3)
        {
            point.x = 3;
        }


        battleMainCamera.transform.position = new Vector3(point.x, point.y, battleMainCamera.transform.position.z);
    }
Example #5
0
 /// <summary>
 /// creates a new <see cref="HoldemCommand"/>
 /// </summary>
 /// <param name="casino">access to holdem module</param>
 /// <param name="playermodule">access to player data</param>
 /// <param name="messagemodule">access to game messages</param>
 /// <param name="imagemodule">access to card images</param>
 public HoldemCommand(HoldemModule casino, PlayerModule playermodule, RPGMessageModule messagemodule, CardImageModule imagemodule)
 {
     this.casino        = casino;
     this.playermodule  = playermodule;
     this.messagemodule = messagemodule;
     this.imagemodule   = imagemodule;
 }
Example #6
0
 public void NewPlayer(string name)
 {
     this.player = new PlayerModule();
     player.Name = name;
     player.Id   = Guid.NewGuid().ToString();
     this.gameService.Players.Add(player);
 }
Example #7
0
 public override void Pack(BinaryWriter writer)
 {
     Qualities.Pack(writer);
     PlayerModule.Pack(writer);
     ContentProfile.Pack(writer);
     InventoryPlacement.Pack(writer);
 }
Example #8
0
 public CallCommand(HoldemModule casino, PlayerModule playermodule, RPGMessageModule messagemodule, CardImageModule cardimages)
 {
     this.casino        = casino;
     this.playermodule  = playermodule;
     this.messagemodule = messagemodule;
     this.cardimages    = cardimages;
 }
Example #9
0
        public void SetNewName()
        {
            var module = new PlayerModule();

            module.TryLogInPlayer(NewName);
            SetActivePlayer(NewName);
        }
Example #10
0
    public void PlayerGaveCardPenalty(string fromPlayer, string toPlayer, int fromIndex, int toIndex)
    {
        PlayerModule giver = GetPlayer(fromPlayer);
        PlayerModule taker = GetPlayer(toPlayer);

        StartCoroutine(PlayerGaveCardPenaltyRoutine(giver, taker, fromIndex, toIndex));
    }
Example #11
0
    public void InitLoginUI()
    {
        //this.menuPanel.Invoke("DisableButtons",0);
        //load plot caption if game first play
        if (PlayerModule.Instance().IsChooseLevel)
        {
            OnChooseLevelListener();
            return;
        }

        if (PlayerModule.Instance().IsFirstPlay)
        {
            this.logoPanel.ShowLogoPanel(true);
            this.logoPanel.ShowStudio(false);
            this.logoPanel.ShowLeftSpeaker(false);
            this.logoPanel.ShowRightSpeaker(false);
            this.logoPanel.ShowCaptions(false);
            this.menuPanel.ShowMenuPanel(false);
            this.menuPanel.DisableButtons();
            this.menuPanel.ShowSecondPlayUI(false);

            Invoke("LeftSpeakerCheck", logoTime);
            Invoke("RightSpeakerCheck", checkTime + logoTime);
            Invoke("PlayLoginPlot", checkTime * 2 + logoTime);
            menuTime = checkTime * 2 + logoTime + soloTrigger[PlotCaptionMap.Count - 1] + 5.0f;
        }
        else
        {
            this.logoPanel.ShowStudio(true);
            this.logoPanel.ShowLogoPanel(false);
            menuTime = 0;            //logoTime;
        }

        Invoke("LoadMenu", menuTime);
    }
Example #12
0
 void Update()
 {
     if (string.IsNullOrEmpty(txtPlayerName.text))
     {
         txtPlayerName.text = PlayerModule.GetInstance().RoleName;
     }
 }
Example #13
0
    IEnumerator PlayerDumpCardRoutine(PlayerModule player)
    {
        isBusy = true;

        CardUI cardSet = FocusedCard;

        cardSet.Align(DumpPile.AirPoint, player);

        UnsetMarkers();

        yield return(new WaitForSeconds(1f));

        cardSet.Align(DumpPile.TopCard.transform, player);

        while (cardSet.isLerping)
        {
            yield return(0);
        }

        AudioControl.Instance.PlayInPosition("fp_flip_cards_color", cardSet.transform.position);
        DumpPile.PushCard(cardSet.Data);

        DestroyCard(cardSet);

        isBusy = false;
    }
Example #14
0
    public void SetTurn(string playerName)
    {
        HaltPreviousTurn();

        CurrentPlayer = GetPlayer(playerName);

        LerpTurnGlow(CurrentPlayer);

        if (CurrentPlayer.isPlayer)
        {
            SetMessage("Your Turn...");

            Phase = TurnPhase.DrawCard;


            if (TutorialMode)
            {
                GuideManager.Instance.TryTeach(3);
            }
        }
        else
        {
            SetMessage(playerName + "'s Turn...");

            Phase = TurnPhase.OtherPlayer;
        }

        TurnTimer.SetTime(20);
    }
Example #15
0
        public void ShouldAddPlayerViewToPlayerRegion()
        {
            var regionManager  = new MockRegionManager();
            var container      = new MockUnityResolver();
            var menuButtonView = new MockMenuButtonView();

            container.Bag.Add(typeof(IPlayerViewPresenter), new MockPlayerViewPresenter());

            MockSequencePreviewMenuButtonViewModel menuViewModel = new MockSequencePreviewMenuButtonViewModel();

            menuViewModel.View = menuButtonView;

            container.Bag[typeof(IMenuButtonViewModel)] = menuViewModel;

            MockRegion mainRegion = new MockRegion {
                Name = "MainRegion"
            };
            MockRegion menuRegion = new MockRegion {
                Name = "MenuRegion"
            };

            regionManager.Regions.Add(mainRegion);
            regionManager.Regions.Add(menuRegion);

            var module = new PlayerModule(container, regionManager, new MockWindowManager());

            Assert.AreEqual(0, mainRegion.AddedViews.Count);

            module.Initialize();

            Assert.AreEqual(1, mainRegion.AddedViews.Count);
            Assert.IsInstanceOfType(mainRegion.AddedViews[0], typeof(IPlayerView));
        }
Example #16
0
    public void Create(BulletType type, float bulletSpeed)
    {
        this.type = type;
        speed     = bulletSpeed;

        switch (type)
        {
        case BulletType.Guided:
        case BulletType.Rotate:
            PlayerModule p = FindObjectOfType <PlayerModule>();
            if (p == null)
            {
                break;
            }

            float angle = GetAngle(p.transform.position,
                                   transform.position);

            transform.rotation = Quaternion.Euler(0, 0, angle);
            return;

        case BulletType.Default: break;
        }

        transform.Rotate(0, 0, 180);
    }
Example #17
0
        public static CharacterOptionsEvent read(BinaryReader binaryReader)
        {
            CharacterOptionsEvent newObj = new CharacterOptionsEvent();

            newObj.i_pMod = PlayerModule.read(binaryReader);
            return(newObj);
        }
Example #18
0
 public SplitCommand(BlackJackModule blackjack, PlayerModule playermodule, RPGMessageModule messages, CardImageModule images)
 {
     this.blackjack    = blackjack;
     this.playermodule = playermodule;
     this.messages     = messages;
     this.images       = images;
 }
Example #19
0
 public static PlayerModule Instance()
 {
     if (inst == null)
     {
         inst = new PlayerModule();
     }
     return(inst);
 }
Example #20
0
 private void InitGameData()
 {
     if (!PlayerModule.Instance().PlayerDataExist())
     {
         Debug.Log("Create Game Data File!");
         PlayerModule.Instance().WritePlayerData();
     }
 }
Example #21
0
        private static void LevelStatusGump_OnCommand(CommandEventArgs e)
        {
            PlayerMobile pm     = e.Mobile as PlayerMobile;
            PlayerModule module = pm.PlayerModule;

            e.Mobile.CloseGump(typeof(LevelStatusGump));
            e.Mobile.SendGump(new LevelStatusGump(e.Mobile));
        }
Example #22
0
 public override void Unpack(BinaryReader reader)
 {
     base.Unpack(reader);
     Qualities.Unpack(reader);
     PlayerModule.Unpack(reader);
     ContentProfile.Unpack(reader);
     InventoryPlacement.Unpack(reader);
 }
Example #23
0
 // Trigger go to sofa room up
 void TriggerFinalRoom1()
 {
     //trigger light
     watchPos = watchPos1;
     watchRot = watchRot1;
     spotLightUp.gameObject.SetActive(true);
     PlayerModule.Instance().IsTestPassed = 1;
 }
Example #24
0
 // Trigger go to sofa room down
 void TriggerFinalRoom2()
 {
     //trigger light
     watchPos = watchPos2;
     watchRot = watchRot2;
     spotLightDown.gameObject.SetActive(true);
     PlayerModule.Instance().IsTestPassed = 2;
 }
Example #25
0
    IEnumerator DrawCardRoutine(int Pile, PlayerModule player, CardData card = null)
    {
        isBusy = true;

        yield return(0);

        if (Pile == 0)
        {
            FocusedCard = GamePile.PullCard(card).GetComponent <CardUI>();
        }
        else if (Pile == 1)
        {
            FocusedCard = DumpPile.PullCard().GetComponent <CardUI>();
        }

        yield return(0);

        if (player.isPlayer)
        {
            FocusedCard.transform.SetParent(GameCamera.Instance.FocusSpot);
            FocusedCard.Align(GameCamera.Instance.FocusSpot, null, false);
        }
        else
        {
            FocusedCard.Align(player.ViewSpot, player, true, false);
        }

        AudioControl.Instance.PlayInPosition("fp_deal_cards_justwhoosh", FocusedCard.transform.position);
        FocusedCard.SetUninteractable();

        while (FocusedCard != null && FocusedCard.isLerping)
        {
            yield return(0);
        }


        UnsetMarkers();

        if (player.isPlayer)
        {
            foreach (CardSlot slot in player.CardSlots)
            {
                if (slot.Card != null)
                {
                    SetMarker(slot.Card.transform);
                }
            }
        }

        if (TutorialMode)
        {
            GuideManager.Instance.TryTeach(2);
        }

        yield return(0);

        isBusy = false;
    }
Example #26
0
        public static void Initialize()
        {
            // Atomic Modules
            CoreModule.Initialize();
            MathModule.Initialize();
            EngineModule.Initialize();
            InputModule.Initialize();
            IOModule.Initialize();
            ResourceModule.Initialize();
            AudioModule.Initialize();
            GraphicsModule.Initialize();
            SceneModule.Initialize();
            Atomic2DModule.Initialize();
            NavigationModule.Initialize();
            NetworkModule.Initialize();
            PhysicsModule.Initialize();
            EnvironmentModule.Initialize();
            UIModule.Initialize();

#if ATOMIC_DESKTOP
            IPCModule.Initialize();
#endif

            AtomicAppModule.Initialize();
            ScriptModule.Initialize();

            AtomicNETScriptModule.Initialize();
            AtomicNETNativeModule.Initialize();

            PlayerModule.Initialize();

            coreDelegates = new CoreDelegates();
            coreDelegates.eventDispatch  = NativeCore.EventDispatch;
            coreDelegates.updateDispatch = NativeCore.UpdateDispatch;

            IntPtr coreptr = csi_Atomic_NETCore_Initialize(ref coreDelegates);

            NETCore core = (coreptr == IntPtr.Zero ? null : NativeCore.WrapNative <NETCore>(coreptr));

            if (core != null)
            {
                AtomicNET.RegisterSubsystem("NETCore", core);
            }

            context = core.Context;

            NativeCore.Initialize();
            CSComponentCore.Initialize();

#if ATOMIC_DESKTOP
            string[] arguments = Environment.GetCommandLineArgs();
            foreach (string arg in arguments)
            {
                AppBase.AddArgument(arg);
            }
#endif
        }
Example #27
0
    public void LerpTurnGlow(PlayerModule player)
    {
        if (TurnGlowCoroutineInstnace != null)
        {
            StopCoroutine(TurnGlowCoroutineInstnace);
        }

        TurnGlowCoroutineInstnace = StartCoroutine(TurnGlowLerpRoutine(player));
    }
Example #28
0
 // Use this for initialization
 void Start()
 {
     for (int i = 0; i < 3; i++)
     {
         pcSkills.Add(new PlayerSkill());
         pcSkillCd.Add(0);
     }
     player = BattleManager.getInstance().player;
 }
Example #29
0
    void OnStartListener()
    {
        PlayerModule.Instance().SetPlayDate();
        PlayerModule.Instance().IsFirstPlay  = false;
        PlayerModule.Instance().IsTestPassed = 0;

        Application.LoadLevel(MainBehaviour.startScene);

        Debug.Log("Game : Start!");
    }
Example #30
0
 private void UpdateMap()
 {
     if (_charaViewDic != null)
     {
         GameObject tempPlayer;
         if (_charaViewDic.TryGetValue(PlayerModule.GetInstance().RoleID, out tempPlayer))
         {
             MapManager.GetInstance().Update(tempPlayer.transform.position);
         }
     }
 }