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); } }
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"); }
// 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); }
/// <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; }
public void NewPlayer(string name) { this.player = new PlayerModule(); player.Name = name; player.Id = Guid.NewGuid().ToString(); this.gameService.Players.Add(player); }
public override void Pack(BinaryWriter writer) { Qualities.Pack(writer); PlayerModule.Pack(writer); ContentProfile.Pack(writer); InventoryPlacement.Pack(writer); }
public CallCommand(HoldemModule casino, PlayerModule playermodule, RPGMessageModule messagemodule, CardImageModule cardimages) { this.casino = casino; this.playermodule = playermodule; this.messagemodule = messagemodule; this.cardimages = cardimages; }
public void SetNewName() { var module = new PlayerModule(); module.TryLogInPlayer(NewName); SetActivePlayer(NewName); }
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)); }
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); }
void Update() { if (string.IsNullOrEmpty(txtPlayerName.text)) { txtPlayerName.text = PlayerModule.GetInstance().RoleName; } }
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; }
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); }
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)); }
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); }
public static CharacterOptionsEvent read(BinaryReader binaryReader) { CharacterOptionsEvent newObj = new CharacterOptionsEvent(); newObj.i_pMod = PlayerModule.read(binaryReader); return(newObj); }
public SplitCommand(BlackJackModule blackjack, PlayerModule playermodule, RPGMessageModule messages, CardImageModule images) { this.blackjack = blackjack; this.playermodule = playermodule; this.messages = messages; this.images = images; }
public static PlayerModule Instance() { if (inst == null) { inst = new PlayerModule(); } return(inst); }
private void InitGameData() { if (!PlayerModule.Instance().PlayerDataExist()) { Debug.Log("Create Game Data File!"); PlayerModule.Instance().WritePlayerData(); } }
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)); }
public override void Unpack(BinaryReader reader) { base.Unpack(reader); Qualities.Unpack(reader); PlayerModule.Unpack(reader); ContentProfile.Unpack(reader); InventoryPlacement.Unpack(reader); }
// Trigger go to sofa room up void TriggerFinalRoom1() { //trigger light watchPos = watchPos1; watchRot = watchRot1; spotLightUp.gameObject.SetActive(true); PlayerModule.Instance().IsTestPassed = 1; }
// Trigger go to sofa room down void TriggerFinalRoom2() { //trigger light watchPos = watchPos2; watchRot = watchRot2; spotLightDown.gameObject.SetActive(true); PlayerModule.Instance().IsTestPassed = 2; }
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; }
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 }
public void LerpTurnGlow(PlayerModule player) { if (TurnGlowCoroutineInstnace != null) { StopCoroutine(TurnGlowCoroutineInstnace); } TurnGlowCoroutineInstnace = StartCoroutine(TurnGlowLerpRoutine(player)); }
// Use this for initialization void Start() { for (int i = 0; i < 3; i++) { pcSkills.Add(new PlayerSkill()); pcSkillCd.Add(0); } player = BattleManager.getInstance().player; }
void OnStartListener() { PlayerModule.Instance().SetPlayDate(); PlayerModule.Instance().IsFirstPlay = false; PlayerModule.Instance().IsTestPassed = 0; Application.LoadLevel(MainBehaviour.startScene); Debug.Log("Game : Start!"); }
private void UpdateMap() { if (_charaViewDic != null) { GameObject tempPlayer; if (_charaViewDic.TryGetValue(PlayerModule.GetInstance().RoleID, out tempPlayer)) { MapManager.GetInstance().Update(tempPlayer.transform.position); } } }