public WithDisguisingInfantryBody(ActorInitializer init, WithDisguisingInfantryBodyInfo info)
     : base(init, info)
 {
     this.info = info;
     rs        = init.Self.Trait <RenderSprites>();
     disguise  = init.Self.Trait <Disguise>();
 }
Beispiel #2
0
 public RenderDisguise(Actor self, RenderDisguiseInfo info)
     : base(self, info)
 {
     this.info      = info;
     disguise       = self.Trait <Disguise>();
     intendedSprite = disguise.AsSprite;
 }
Beispiel #3
0
        public void Tick()
        {
            if (Disguise.Level != Parent.Level && Disguise.IsSpawned)
            {
                Disguise.DespawnEntity();
                Disguise.Level = Parent.Level;
                Disguise.SpawnEntity();
            }

            // if (Disguise.IsSpawned)
            {
                if (Disguise.KnownPosition != Parent.KnownPosition)
                {
                    Disguise.LastUpdatedTime = Parent.LastUpdatedTime;
                    Disguise.KnownPosition   = new PlayerLocation(Parent.KnownPosition.X + PositionOffset.X, Parent.KnownPosition.Y + PositionOffset.Y,
                                                                  Parent.KnownPosition.Z + PositionOffset.Z, Parent.KnownPosition.HeadYaw, Parent.KnownPosition.Yaw,
                                                                  Parent.KnownPosition.Pitch);

                    Disguise.BroadcastMove(true);
                    //  if (Parent is OpenPlayer player)
                    // {
                    //     player.SendMessage("Disguise pos: " + Disguise.KnownPosition);
                    //}
                }
            }
        }
    // Use this for initialization
    void Start()
    {
        myInventory = GetComponent <Inventory>();


        a = new Disguise("Guard");
        b = new Disguise("Nurse");
        c = new Keycard("Red");
        d = new Keycard("blue");


        myInventory.AddTo(a);
        myInventory.AddTo(d);
        myInventory.AddTo(b);
        myInventory.AddTo(c);



        Item randItem = myInventory.getItem((int)UnityEngine.Random.RandomRange(0, 4));


        if (randItem is Keycard)
        {
            (randItem as Keycard).snapKeyCard();
        }
        if (randItem is Disguise)
        {
            (randItem as Disguise).crackle();
        }
    }
 private static Composite CreateHook()
 {
     return
         (new Decorator(r => Disguise != null && StyxWoW.Me.IsAlive && !StyxWoW.Me.Combat && StyxWoW.Me.ZoneId == 46 && !Disguised,
                        new Action(r =>
     {
         Navigator.PlayerMover.MoveStop();
         Disguise.Use();
     })));
 }
Beispiel #6
0
        public void SpawnToPlayers(MiNET.Player[] players)
        {
            Disguise.Level = Parent.Level;

            if (!SpawnToSelf)
            {
                players = players.Where(x => x != Parent).ToArray();
            }

            Disguise.SpawnToPlayers(players);
        }
Beispiel #7
0
 private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
 {
     if (CheckpointValues.CurrentState > GameState.FindClothes)
     {
         //Ring.SetActive(false);
         Destroy(Ring);
         Destroy(Shirt);
         Destroy(Pants);
         Disguise.SetActive(false);
         this.gameObject.SetActive(false);
     }
 }
Beispiel #8
0
        static void Main(string[] args)
        {
            createTypes();
            createMoves();
            createAbilities();
            makePokemon();

            Brick_Break.Print();
            Grass.Print();
            Disguise.Print();

            Console.ReadLine();
        }
Beispiel #9
0
 public Configuration()
 {
     UseIE           = false;
     StartIndex      = "0";
     IndexStep       = "10";
     MaxIndex        = "770";
     HttpHead        = "http://www.baidu.com/s?tn=baiduhome_pg&ie=utf-8&cl=3";
     Regex           = "href=\"(?<url>http(s)?://www.baidu.com/link\\?url=(.*?))\"(\\s*)(.*)(\\s*)>(?<text>(.*?))</a>";
     FirstURL        = "{HttpHead}&wd=filetype:{filetype}+{keyword}&pn=0";
     SearchURL       = "{HttpHead}&wd=filetype:{filetype}+{keyword}&pn={index}";
     Redirect        = "true";
     confusionString = new ConfusionString("html鐗");
     forbiddenString = new ForbiddenString("百度文库");
     disguise        = new Disguise();
 }
        public override JSONObject Serialize()
        {
            JSONObject obj = new JSONObject();

            obj.Add(cAppraise, Appraise.Serialize());
            obj.Add(cBalance, Balance.Serialize());
            obj.Add(cBluff, Bluff.Serialize());
            obj.Add(cClimb, Climb.Serialize());
            obj.Add(cConcentration, Concentration.Serialize());
            obj.Add(cDecipherScript, DecipherScript.Serialize());
            obj.Add(cDiplomacy, Diplomacy.Serialize());
            obj.Add(cDisableDevice, DisableDevice.Serialize());
            obj.Add(cDisguise, Disguise.Serialize());
            obj.Add(cEscapeArtist, EscapeArtist.Serialize());
            obj.Add(cForgery, Forgery.Serialize());
            obj.Add(cGatherInformation, GatherInformation.Serialize());
            obj.Add(cHandleAnimal, HandleAnimal.Serialize());
            obj.Add(cHeal, Heal.Serialize());
            obj.Add(cHide, Hide.Serialize());
            obj.Add(cIntimidate, Intimidate.Serialize());
            obj.Add(cJump, Jump.Serialize());
            obj.Add(cListen, Listen.Serialize());
            obj.Add(cMoveSilently, MoveSilently.Serialize());
            obj.Add(cOpenLock, OpenLock.Serialize());
            obj.Add(cRide, Ride.Serialize());
            obj.Add(cSearch, Search.Serialize());
            obj.Add(cSenseMotive, SenseMotive.Serialize());
            obj.Add(cSleightOfHand, SleightOfHand.Serialize());
            obj.Add(cSpellCraft, SpellCraft.Serialize());
            obj.Add(cSpot, Spot.Serialize());
            obj.Add(cSurvival, Survival.Serialize());
            obj.Add(cSwim, Swim.Serialize());
            obj.Add(cTumble, Tumble.Serialize());
            obj.Add(cUseMagicDevice, UseMagicDevice.Serialize());
            obj.Add(cUseRope, UseRope.Serialize());
            return(obj);
        }
Beispiel #11
0
 public DisguiseProperties(ScriptContext context, Actor self)
     : base(context, self)
 {
     disguise = Self.Trait <Disguise>();
 }
Beispiel #12
0
 public void DespawnDisguise()
 {
     Disguise.DespawnEntity();
 }
Beispiel #13
0
 public void SpawnDisguise()
 {
     Disguise.Level = Parent.Level;
     Disguise.SpawnEntity();
 }
Beispiel #14
0
 public void DespawnFromPlayers(MiNET.Player[] players)
 {
     Disguise.DespawnFromPlayers(players);
 }
Beispiel #15
0
    private void PrepareLevel(bool spawnPlayer)
    {
        Level level = new Level(LEVEL_WIDTH, LEVEL_HEIGHT);

        BOUNDRY_BLOCKS[0] = new Vector3(0, 0);
        BOUNDRY_BLOCKS[1] = new Vector3(LEVEL_WIDTH * 2.65f, 0);
        BOUNDRY_BLOCKS[2] = new Vector3(0, LEVEL_HEIGHT * 2.65f);
        BOUNDRY_BLOCKS[3] = new Vector3(0, 0);

        for (int x = 0; x < LEVEL_WIDTH; x++)
        {
            for (int y = 0; y < LEVEL_HEIGHT; y++)
            {
                Color color = currentLevelTex.GetPixel(x, y);
                if (ColorMap.MatchesColor(color, ColorMap.THEME_FOREST)) // read in theme
                {
                    ThemeLoader.LoadForestTheme();
                }
                else if (ColorMap.MatchesColor(color, ColorMap.THEME_DESERT))
                {
                    ThemeLoader.LoadDesertTheme();
                }
                else if (ColorMap.MatchesColor(color, ColorMap.DULL_BLOCK))
                {
                    DullBlock block = Instantiate(defaultBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.CHECKPOINT))
                {
                    CheckpointBlock block = Instantiate(checkpointBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                    CheckpointManager.AddCheckpoint(block);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.AIR_BLOCK))
                {
                    AirBlock block = Instantiate(airBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.SPEED_BLOCK))
                {
                    SpeedBlock block = Instantiate(speedBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.CRUMBLY_BLOCK))
                {
                    CrumblyBlock block = Instantiate(crumblyBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.FINISH))
                {
                    FinishBlock block = Instantiate(finishBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.LEAP_BOOST_BLOCK))
                {
                    LeapBoostBlock block = Instantiate(leapBoostBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.AUTO_LEAP_BOOST_BLOCK))
                {
                    AutoLeapBoostBlock block = Instantiate(autoLeapBoostBlock);
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.DISGUISED_CRUMBLY_BLOCK))
                {
                    CrumblyBlock block    = Instantiate(crumblyBlock);
                    Disguise     disguise = block.gameObject.AddComponent <Disguise>();
                    disguise.identity   = crumblyBlock.GetComponent <SpriteRenderer>().sprite;
                    disguise.camouflage = defaultBlock.GetComponent <SpriteRenderer>().sprite;
                    disguise.HideIdentity();
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.DISGUISED_AUTO_LEAP_BOOST_BLOCK))
                {
                    AutoLeapBoostBlock block    = Instantiate(autoLeapBoostBlock);
                    Disguise           disguise = block.gameObject.AddComponent <Disguise>();
                    disguise.identity   = autoLeapBoostBlock.GetComponent <SpriteRenderer>().sprite;
                    disguise.camouflage = defaultBlock.GetComponent <SpriteRenderer>().sprite;
                    disguise.HideIdentity();
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.DISGUISED_DULL_BLOCK))
                {
                    DullBlock block    = Instantiate(defaultBlock);
                    Disguise  disguise = block.gameObject.AddComponent <Disguise>();
                    disguise.identity   = defaultBlock.GetComponent <SpriteRenderer>().sprite;
                    disguise.camouflage = null;
                    disguise.HideIdentity();
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.GHOST_BLOCK))
                {
                    DullBlock block    = Instantiate(defaultBlock);
                    Disguise  disguise = block.gameObject.AddComponent <Disguise>();
                    disguise.identity   = null;
                    disguise.camouflage = null;
                    disguise.HideIdentity();
                    block.block = Block.init(x, y, level, block.gameObject);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.ENEMY_SUKAMON))
                {
                    // spawn sukamon
                    EnemyControl ec = Instantiate(sukamon);
                    ec.transform.position = new Vector3(x * 2.65f, y * 2.65f + 0.5f);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.DIGIVICE))
                {
                }
                else if (ColorMap.MatchesColor(color, ColorMap.ENEMY_KINGETEMON))
                {
                    EnemyControl ec = Instantiate(kingetemon);
                    ec.transform.position = new Vector3(x * 2.65f, y * 2.65f + 0.5f);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.ENEMY_SUKAMON_STATIC))
                {
                    EnemyControl ec = Instantiate(sukamon);
                    ec.blockRadius        = 0;
                    ec.transform.position = new Vector3(x * 2.65f, y * 2.65f + 0.5f);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.ENEMY_GIGANTIC_SUKAMON))
                {
                    EnemyControl ec = Instantiate(giganticSukamon);
                    ec.blockRadius = 20;
                    ec.moveSpeed   = 8;
                    //ec.health *= 5;
                    ec.transform.position = new Vector3(x * 2.65f, y * 2.65f + 0.5f);
                }
                else if (ColorMap.MatchesColor(color, ColorMap.WOODEN_SIGN))
                {
                    SignDialogue sd = Instantiate(signDialogue);
                    sd.transform.position = new Vector3(x * 2.65f, y * 2.65f + 0.5f);
                }
            }
        }

        currentLevel = level;

        foreach (var observer in OBSERVERS)
        {
            observer.OnLevelLoaded(level);
        }

        if (spawnPlayer)
        {
            int score = 1;
            if (currentPlayerInstance != null)
            {
                score = currentPlayerInstance.score;
            }
            Vector3 pos = CheckpointManager.ActiveCheckpoint.transform.position;
            Player  p   = Instantiate(player);
            p.transform.position  = new Vector3(pos.x, pos.y + 5, pos.z);
            currentPlayerInstance = p;
            p.score = score;
            Debug.Log(p.score);

            Camera.main.GetComponent <CamCapture>().player        = p;
            Camera.main.GetComponent <CamCapture>().boundryBlocks = BOUNDRY_BLOCKS;
        }
    }