상속: Item
예제 #1
0
    // Use this for initialization
    void Awake()
    {
        myTransform = transform;
        myRigidbody = rigidbody;
        myRigidbody.freezeRotation = true;

        startSpeed = moveSpeed;
        startNextFoot = nextFoot;

        runningSpeed = startSpeed + 2.0f;
        runningNextFoot = nextFoot - 0.25f;

        myState = NPC.Chasing;

        GameObject targetObject = GameObject.Find( "Player" );

        if ( targetObject )
        {
            target = targetObject.transform;

            lanternScript = target.GetComponentInChildren< Lantern >();
        }
        else
        {
            Debug.Log( "no object named player was found" );
        }
    }
예제 #2
0
        public override void InitOutfit()
        {
            Lantern lantern = new Lantern();

            lantern.Ignite();

            AddItem(lantern);
            AddItem(new Shoes(Utility.RandomNeutralHue()));
            AddItem(new Bonnet(Utility.RandomPinkHue()));
            AddItem(new PlainDress(Utility.RandomPinkHue()));
        }
예제 #3
0
파일: NicPlayer.cs 프로젝트: N8-Des/MOBA
    public override void R()
    {
        GameObject nicLantern = GameObject.Instantiate((GameObject)Resources.Load("NicLantern"));
        Lantern    newLantern = nicLantern.GetComponent <Lantern>();

        nicLantern.transform.position = lanternPosition;
        newLantern.gm           = gameManager;
        newLantern.monicaDamage = RDamage + (int)(AbilityPower * 0.1);
        newLantern.monicaHealth = monicaHealth + (int)(maxHealth * 0.15);
        newLantern.nic          = this;
    }
예제 #4
0
        public ICollection <IProduct> CreateProducts()
        {
            ICollection <IProduct> products = new List <IProduct>();

            foreach (Color color in Enum.GetValues(typeof(Color)))
            {
                IProduct product = new Lantern(new ProductId(color.ToString()), color);
                products.Add(product);
            }
            return(products);
        }
예제 #5
0
    /*
     * Method to retrieve the character components.
     */
    private void Start()
    {
        controller    = GetComponent <CharacterController>();
        noiseCollider = GetComponent <SphereCollider>();
        lantern       = GetComponentInChildren <Lantern>();

        Health.OnHealthCollect += AddHealth;
        Shield.OnShieldCollect += AddShield;
        InaudiblePlayer.OnInaudiblePlayerCollect += SetInaudiblePlayer;
        EnemyController.OnEnemyDeath             += (enemy) => defeatedEnemies++;
    }
        public override void Serialize(GenericWriter writer)
        {
            if (m_Lantern != null && m_Lantern.Deleted)
            {
                m_Lantern = null;
            }

            base.Serialize(writer);

            writer.Write((int)0);                // version

            writer.Write(m_Lantern);
        }
예제 #7
0
        public override void Serialize(IGenericWriter writer)
        {
            if (m_Lantern?.Deleted == true)
            {
                m_Lantern = null;
            }

            base.Serialize(writer);

            writer.Write(0); // version

            writer.Write(m_Lantern);
        }
예제 #8
0
    public void Setup(Player playerRef, Lantern lanternRef)
    {
        _rushStats = GameData.Instance.Data.AbilityData.GetRushStats();

        _thePlayer   = playerRef;
        _lantern     = lanternRef;
        _playerBody  = _thePlayer.GetComponent <Rigidbody2D>();
        _gameHud     = FindObjectOfType <GameUI>();
        _gameHandler = FindObjectOfType <GameHandler>();

        SetAbilityAttributes();
        SetupHudBar();
    }
예제 #9
0
		public override void OnDoubleClick( Mobile from )
		{
			if( IsChildOf( from.Backpack ) )
            {
                Item w = new Lantern();
                w.Hue = Utility.RandomList(Sphere.RareHues);

                from.AddToBackpack(w);
                Delete();
            }
			else
				from.SendAsciiMessage( "That must be in your pack for you to use it." );
		}
예제 #10
0
        private void DrawLantern(SpriteBatch spriteBatch, Lantern lantern, Color opacity, Vector2 depthScale, Vector2 position, float alpha)
        {
            float y     = (Main.GlobalTimeWrappedHourly % 6f / 6f * ((float)Math.PI * 2f)).ToRotationVector2().Y;
            float scale = y * 0.2f + 0.8f;
            Color color = new Color(255, 255, 255, 0) * _opacity * alpha * scale * 0.4f;

            for (float num = 0f; num < 1f; num += 0.333333343f)
            {
                Vector2 value = new Vector2(0f, 2f).RotatedBy((float)Math.PI * 2f * num + lantern.Rotation) * y;
                spriteBatch.Draw(lantern.Texture, position + value, lantern.GetSourceRectangle(), color, lantern.Rotation, lantern.GetSourceRectangle().Size() / 2f, depthScale.X * 2f, SpriteEffects.None, 0f);
            }
            spriteBatch.Draw(lantern.Texture, position, lantern.GetSourceRectangle(), opacity * _opacity, lantern.Rotation, lantern.GetSourceRectangle().Size() / 2f, depthScale.X * 2f, SpriteEffects.None, 0f);
        }
예제 #11
0
        public SchmendrickApprenticeCorpse() : base(GetOwner(), GetHair(), GetFacialHair(), GetEquipment())
        {
            Direction = Direction.West;

            foreach (Item item in EquipItems)
            {
                DropItem(item);
            }

            m_Lantern = new Lantern {
                Movable = false, Protected = true
            };
            m_Lantern.Ignite();
        }
        public SchmendrickApprenticeCorpse()
            : base(GetOwner(), GetHair(), GetFacialHair(), GetEquipment())
        {
            this.Direction = Direction.West;

            foreach (Item item in this.EquipItems)
            {
                this.DropItem(item);
            }

            this.m_Lantern           = new Lantern();
            this.m_Lantern.Movable   = false;
            this.m_Lantern.Protected = true;
            this.m_Lantern.Ignite();
        }
예제 #13
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack))
            {
                Item w = new Lantern();
                w.Hue = Utility.RandomList(Sphere.RareHues);

                from.AddToBackpack(w);
                Delete();
            }
            else
            {
                from.SendAsciiMessage("That must be in your pack for you to use it.");
            }
        }
예제 #14
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Lockpick", typeof(Lockpick), Lockpick.GetSBPurchaseValue(), 100, 0x14FC, 0));
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));

                Add(new GenericBuyInfo("Lantern", typeof(Lantern), Lantern.GetSBPurchaseValue(), 25, 0xA25, 0));
                Add(new GenericBuyInfo("Torch", typeof(Torch), Torch.GetSBPurchaseValue(), 25, 0xF6B, 0));
                Add(new GenericBuyInfo("Candle", typeof(Candle), Candle.GetSBPurchaseValue(), 25, 0xA28, 0));
                Add(new GenericBuyInfo("Bedroll", typeof(Bedroll), Bedroll.GetSBPurchaseValue(), 25, 0xA57, 0));
                Add(new GenericBuyInfo("Backpack", typeof(Backpack), Backpack.GetSBPurchaseValue(), 25, 0x9B2, 0));
                Add(new GenericBuyInfo("Bag", typeof(Bag), Bag.GetSBPurchaseValue(), 25, 0xE76, 0));
                Add(new GenericBuyInfo("Pouch", typeof(Pouch), Pouch.GetSBPurchaseValue(), 25, 0xE79, 0));
                Add(new GenericBuyInfo("Wooden Box", typeof(WoodenBox), WoodenBox.GetSBPurchaseValue(), 25, 0xE7D, 0));

                Add(new GenericBuyInfo("Hair Dye", typeof(HairDye), HairDye.GetSBPurchaseValue(), 10, 0xEFF, 0));
            }
예제 #15
0
            public InternalSellInfo()
            {
                Add(typeof(Lockpick), Lockpick.GetSBSellValue());
                Add(typeof(Dagger), Dagger.GetSBSellValue());

                Add(typeof(Lantern), Lantern.GetSBSellValue());
                Add(typeof(Torch), Torch.GetSBSellValue());
                Add(typeof(Candle), Candle.GetSBSellValue());
                Add(typeof(Bedroll), Bedroll.GetSBSellValue());
                Add(typeof(Backpack), Backpack.GetSBSellValue());
                Add(typeof(Bag), Bag.GetSBSellValue());
                Add(typeof(Pouch), Pouch.GetSBSellValue());
                Add(typeof(WoodenBox), WoodenBox.GetSBSellValue());

                Add(typeof(HairDye), HairDye.GetSBSellValue());
            }
예제 #16
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Vendor Rental Contract", typeof(VendorRentalContract), VendorRentalContract.GetSBPurchaseValue(), 25, 0x14F0, 0));

                Add(new GenericBuyInfo("Lantern", typeof(Lantern), Lantern.GetSBPurchaseValue(), 25, 0xA25, 0));
                Add(new GenericBuyInfo("Torch", typeof(Torch), Torch.GetSBPurchaseValue(), 25, 0xF6B, 0));
                Add(new GenericBuyInfo("Candle", typeof(Candle), Candle.GetSBPurchaseValue(), 25, 0xA28, 0));
                Add(new GenericBuyInfo("Backpack", typeof(Backpack), Backpack.GetSBPurchaseValue(), 25, 0x9B2, 0));
                Add(new GenericBuyInfo("Bag", typeof(Bag), Bag.GetSBPurchaseValue(), 25, 0xE76, 0));
                Add(new GenericBuyInfo("Pouch", typeof(Pouch), Pouch.GetSBPurchaseValue(), 25, 0xE79, 0));

                Add(new GenericBuyInfo("Chess Board", typeof(Chessboard), Chessboard.GetSBPurchaseValue(), 25, 0xFA6, 0));
                Add(new GenericBuyInfo("Checker Board", typeof(CheckerBoard), CheckerBoard.GetSBPurchaseValue(), 25, 0xFA6, 0));
                Add(new GenericBuyInfo("Backgammon", typeof(Backgammon), Backgammon.GetSBPurchaseValue(), 25, 0xE1C, 0));
                Add(new GenericBuyInfo("Dice", typeof(Dices), Dices.GetSBPurchaseValue(), 25, 0xFA7, 0));
            }
예제 #17
0
        // Search for player, start CHASE if found
        private void PlayerPatrolSearch()
        {
            Lantern lantern = player.GetComponentInChildren <Lantern>();

            if (lantern.isLit)
            {
                Vector2 rayDirection = player.position - transform.position;

                RaycastHit2D hit2D = Physics2D.Raycast(transform.position, rayDirection, maxVisionDist);
                if (hit2D && hit2D.collider.transform == player)
                {
                    enemyControl.BeginChaseScream();
                    enemyControl.BeginChase();
                    StateToChase(player);
                }
            }
        }
예제 #18
0
        public void FindJunk(Mobile from)
        {
            if (from == null)
            {
                return;
            }

            Item item = null;

            switch (Utility.RandomMinMax(1, 10))
            {
            case 1: item = new Torch(); break;

            case 2: item = new Lantern(); break;

            case 3: item = new Skillet(); break;

            case 4: item = new Beeswax(); break;

            case 5: item = new Bedroll(); break;

            case 6: item = new Dices(); break;

            case 7: item = new Kindling(); break;

            case 8: item = new Bottle(); break;

            case 9: item = new BeverageBottle(BeverageType.Ale); break;

            case 10: item = new Jug(BeverageType.Cider); break;
            }

            if (item != null)
            {
                if (from.AddToBackpack(item))
                {
                    from.SendMessage("You retrieve some junk from the shipwreck and place it in your backpack.");
                }

                else
                {
                    from.SendMessage("You retrieve some junk from the shipwreck, and place it at your feet.");
                    item.MoveToWorld(from.Location, from.Map);
                }
            }
        }
예제 #19
0
    public void SetLightedLantern(Lantern lantern)
    {
        if (canChange)
        {
            lightedLantern = lantern;

            foreach (var item in lanters)
            {
                if (!item.Equals(lightedLantern))
                {
                    item.SetLightOn(false);
                }
            }
            lightedLantern.SetLightOn(true);
            canChange     = false;
            cooldownTimer = 0;
        }
    }
예제 #20
0
        public override void RunEvent()
        {
            player.Freeze();

            foreach (SpriteRenderer sprite in player.GetComponentsInChildren <SpriteRenderer>())
            {
                sprite.sortingOrder += 5;
            }
            GetComponentInChildren <SpriteRenderer>().sortingOrder += 5;

            Lantern lantern = player.GetComponentInChildren <Lantern>();

            lantern.StopAllCoroutines();
            StartCoroutine(Utils.UtilFunctions.LerpCoroutine(lantern.SetLightFraction, 1, 3f, 3f));

            StartCoroutine(Utils.UtilFunctions.LerpCoroutine(player.SizeChange, 1f, 2f, 3f));
            StartCoroutine(Utils.UtilFunctions.LerpCoroutine(lantern.LightSetting, 1f, 2f, 3f));
            spriteAnimator.SetBool("Leaving", true);
        }
예제 #21
0
파일: Engine.cs 프로젝트: tgadfly/Midnight
        public Engine()
        {
            Emitter = new Emitter.EventEmitter();
            Actions = new ActionManager.Manager(this);

            Cache    = new Cache();
            Triggers = new TriggersContainer(this);

            Field = new Battlefield.Field().SetSize(5, 3);

            Chiefs = new[]
            {
                new Chief(0).SetEngine(this),
                new Chief(1).SetEngine(this),
            };

            Turn    = new Turn(this);
            Lantern = new Lantern(this);
        }
예제 #22
0
    private void Awake()
    {
        _data                         = GameData.Instance.Data;
        _playerSpeed                  = 1f;
        _playerRigidBody              = GetComponent <Rigidbody2D>();
        _playerRigidBody.isKinematic  = true;
        _playerRigidBody.gravityScale = GravityScale;
        _audioControl                 = gameObject.AddComponent <ClumsyAudioControl>();
        _gameHandler                  = FindObjectOfType <GameHandler>();
        _anim                         = GetComponent <Animator>();
        _lanternBody                  = GameObject.Find("Lantern").GetComponent <Rigidbody2D>();
        _playerController             = GetComponent <PlayerController>();
        Lantern                       = _lanternBody.GetComponent <Lantern>();
        GameObject clearanceGameObj = GameObject.Find("JumpClearance");

        if (clearanceGameObj)
        {
            _clearance = clearanceGameObj.GetComponent <JumpClearance>();
        }
    }
    // Update is called once per frame
    void Update()
    {
        foreach (Lantern peachBlossom in peachBlossomList)
        {
            peachBlossom.Floating();
            peachBlossom.Boundary();
            peachBlossom.Move();
        }

        for (int j = 0; j < lanternCount; j++)
        {
            lantern = lanternList[j];
            lantern.Floating();
            lantern.Boundary();
            lantern.Move();
        }

        if (timer % interval == 0 && lanternCount < maxLanternCount - 1)
        {
            lanternCount += 1;
        }

        if (timer < maxLanternCount * (interval + 1))
        {
            timer++;
        }

        if (peachBlossomTimer % interval == 0 && peachBlossomCount < maxPeachBlossomCount - 1)
        {
            peachBlossom     = new Lantern(peachBlossomTemplate);
            peachBlossom.vel = Random.insideUnitSphere * 0.05f;
            peachBlossomList.Add(peachBlossom);

            peachBlossomCount += 1;
        }

        if (peachBlossomTimer < maxPeachBlossomCount * (interval + 1))
        {
            peachBlossomTimer += 1;
        }
    }
예제 #24
0
파일: Boat.cs 프로젝트: Phischermen/GGJ2021
    private void Awake()
    {
        if (!Application.isEditor)
        {
            startCrashed = !hasPlayedTutorial;
        }
        // Initialize sub components
        steering      = GetComponentInChildren <BoatSteering>();
        damageManager = GetComponentInChildren <BoatDamageManager>();
        lantern       = GetComponentInChildren <Lantern>();
        sail          = GetComponentInChildren <Sail>();
        captain       = GetComponentInChildren <Captain>();
        //Find main camera and attach camera controller script
        var camera = GameObject.FindGameObjectWithTag("MainCamera");

        cameraController            = camera.AddComponent <CameraController>();
        cameraController.cameraLead = cameraLead;
        // Position camera a little behind boat initially
        cameraController.transform.position = new Vector3(transform.position.x - 5f, transform.position.y - 5f, cameraController.transform.position.z);

        damageManager.boat = captain.boat = sail.boat = steering.boat = cameraController.boat = this;
    }
    // Start is called before the first frame update
    void Start()
    {
        for (int i = 0; i < 20; i++)
        {
            int lanternType = Random.Range(0, 3);
            switch (lanternType)
            {
            case 1:
                lantern = new Lantern(lanternTemplate_Red);
                break;

            case 2:
                lantern = new Lantern(lanternTemplate_Blue);
                break;

            default:
                lantern = new Lantern(lanternTemplate_LightBlue);
                break;
            }
            lantern.vel = Random.insideUnitSphere * 0.05f;
            lanternList.Add(lantern);
        }
    }
예제 #26
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Arrow", typeof(Arrow), Arrow.GetSBPurchaseValue(), 500, 0xF3F, 0));
                Add(new GenericBuyInfo("Bolt", typeof(Bolt), Bolt.GetSBPurchaseValue(), 500, 0x1BFB, 0));
                Add(new GenericBuyInfo("Bandage", typeof(Bandage), Bandage.GetSBPurchaseValue(), 250, 0xE21, 0));

                Add(new GenericBuyInfo("Scissors", typeof(Scissors), Scissors.GetSBPurchaseValue(), 25, 0xF9F, 0));
                Add(new GenericBuyInfo("Sewing Kit", typeof(SewingKit), SewingKit.GetSBPurchaseValue(), 50, 0xF9D, 0));
                Add(new GenericBuyInfo("Dyes", typeof(Dyes), Dyes.GetSBPurchaseValue(), 25, 0xFA9, 0));
                Add(new GenericBuyInfo("Dye Tub", typeof(DyeTub), DyeTub.GetSBPurchaseValue(), 25, 0xFAB, 0));

                Add(new GenericBuyInfo("Lockpick", typeof(Lockpick), Lockpick.GetSBPurchaseValue(), 100, 0x14FC, 0));
                Add(new GenericBuyInfo("Skillet", typeof(Skillet), Skillet.GetSBPurchaseValue(), 50, 0x97F, 0));
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));

                Add(new GenericBuyInfo("Lantern", typeof(Lantern), Lantern.GetSBPurchaseValue(), 25, 0xA25, 0));
                Add(new GenericBuyInfo("Torch", typeof(Torch), Torch.GetSBPurchaseValue(), 25, 0xF6B, 0));
                Add(new GenericBuyInfo("Candle", typeof(Candle), Candle.GetSBPurchaseValue(), 25, 0xA28, 0));
                Add(new GenericBuyInfo("Bedroll", typeof(Bedroll), Bedroll.GetSBPurchaseValue(), 25, 0xA57, 0));
                Add(new GenericBuyInfo("Backpack", typeof(Backpack), Backpack.GetSBPurchaseValue(), 25, 0x9B2, 0));
                Add(new GenericBuyInfo("Bag", typeof(Bag), Bag.GetSBPurchaseValue(), 25, 0xE76, 0));
                Add(new GenericBuyInfo("Pouch", typeof(Pouch), Pouch.GetSBPurchaseValue(), 25, 0xE79, 0));
                Add(new GenericBuyInfo("Wooden Box", typeof(WoodenBox), WoodenBox.GetSBPurchaseValue(), 25, 0xE7D, 0));
            }
예제 #27
0
            public InternalSellInfo()
            {
                Add(typeof(Arrow), Arrow.GetSBSellValue());
                Add(typeof(Bolt), Bolt.GetSBSellValue());
                Add(typeof(Bandage), Bandage.GetSBSellValue());

                Add(typeof(Scissors), Scissors.GetSBSellValue());
                Add(typeof(SewingKit), SewingKit.GetSBSellValue());
                Add(typeof(Dyes), Dyes.GetSBSellValue());
                Add(typeof(DyeTub), DyeTub.GetSBSellValue());

                Add(typeof(Lockpick), Lockpick.GetSBSellValue());
                Add(typeof(Skillet), Skillet.GetSBSellValue());
                Add(typeof(Dagger), Dagger.GetSBSellValue());

                Add(typeof(Lantern), Lantern.GetSBSellValue());
                Add(typeof(Torch), Torch.GetSBSellValue());
                Add(typeof(Candle), Candle.GetSBSellValue());
                Add(typeof(Bedroll), Bedroll.GetSBSellValue());
                Add(typeof(Backpack), Backpack.GetSBSellValue());
                Add(typeof(Bag), Bag.GetSBSellValue());
                Add(typeof(Pouch), Pouch.GetSBSellValue());
                Add(typeof(WoodenBox), WoodenBox.GetSBSellValue());
            }
예제 #28
0
        public override void GenerateLoot()
        {
            if (Utility.Random(100) < 20)
            {
                Lantern lantern = new Lantern();
                lantern.Hue = Utility.RandomMinMax(2113, 2118);
                PackItem(lantern);
            }

            if (Utility.Random(100) < 10)
            {
                Item item;

                switch (Utility.Random(111))
                {
                case 0: item = new Tapestry6W(); break;

                case 1: item = new MetalChest(); break;

                case 2: item = new MetalGoldenChest(); break;

                case 3: item = new MetalBox(); break;

                case 4: item = new AniLargeVioletFlask(); break;

                case 5: item = new AniRedRibbedFlask(); break;

                case 6: item = new AniSmallBlueFlask(); break;

                case 7: item = new BlueBeaker(); break;

                case 8: item = new BlueCurvedFlask(); break;

                case 9: item = new EmptyVial(); break;

                case 10: item = new EmptyVialsWRack(); break;

                case 11: item = new LargeFlask(); break;

                case 12: item = new LargeVioletFlask(); break;

                //case 13: item = new HourGlass(); break;
                //case 14: item = new HourGlassAni(); break;
                case 15: item = new DecorativeDAxeWest(); break;

                case 16: item = new DecorativeDAxeNorth(); break;

                case 17: item = new DecorativeBowWest(); break;

                case 18: item = new DecorativeBowNorth(); break;

                case 19: item = new DecorativeAxeWest(); break;

                case 20: item = new DecorativeAxeNorth(); break;

                case 21: item = new DecorativeShieldSword2West(); break;

                case 22: item = new DecorativeShieldSword2North(); break;

                case 23: item = new DecorativeShieldSword1West(); break;

                case 24: item = new DecorativeShieldSword1North(); break;

                case 25: item = new DecorativeShield11(); break;

                case 26: item = new DecorativeShield10(); break;

                case 27: item = new DecorativeShield9(); break;

                case 28: item = new DecorativeShield8(); break;

                case 29: item = new DecorativeShield7(); break;

                case 30: item = new DecorativeShield6(); break;

                case 31: item = new DecorativeShield5(); break;

                case 32: item = new DecorativeShield4(); break;

                case 33: item = new DecorativeShield3(); break;

                case 34: item = new DecorativeShield2(); break;

                case 35: item = new DecorativeShield1(); break;

                case 36: item = new Whip(); break;

                case 37: item = new SilverWire(); break;

                case 38: item = new Rope(); break;

                case 39: item = new PaintsAndBrush(); break;

                case 40: item = new IronWire(); break;

                case 41: item = new GoldWire(); break;

                case 42: item = new CopperWire(); break;

                case 43: item = new WoodDebris(); break;

                case 44: item = new RuinedPainting(); break;

                case 45: item = new RuinedFallenChairB(); break;

                case 46: item = new FullVialsWRack(); break;

                case 47: item = new FullJar(); break;

                case 48: item = new FullJars2(); break;

                case 49: item = new FullJars3(); break;

                case 50: item = new FullJars4(); break;

                case 51: item = new GreenBeaker(); break;

                case 52: item = new GreenBottle(); break;

                case 53: item = new VioletStemmedBottle(); break;

                case 54: item = new SpinningHourglass(); break;

                case 55: item = new ArcheryButte(); break;

                case 56: item = new PhillipsWoodenSteed(); break;

                case 57: item = new PileOfGlacialSnow(); break;

                case 58: item = new RedPoinsettia(); break;

                case 59: item = new RoseOfTrinsic(); break;

                case 60: item = new RaiseSwitch(); break;

                case 61: item = new SpecialFishingNet(); break;

                case 62: item = new SpecialHairDye(); break;

                case 63: item = new SpecialBeardDye(); break;

                case 64: item = new SnowPile(); break;

                case 65: item = new StatueEast2(); break;

                case 66: item = new StatuePegasus2(); break;

                case 67: item = new StatueSouth2(); break;

                case 68: item = new StatueSouthEast(); break;

                case 69: item = new StatuetteDyeTub(); break;

                case 70: item = new StatueWest(); break;

                case 71: item = new TapestryOfSosaria(); break;

                case 72: item = new WhitePoinsettia(); break;

                case 73: item = new WindChimes(); break;

                case 74: item = new ZoogiFungus(); break;

                case 75: item = new RuinedFallenChairA(); break;

                case 76: item = new RuinedDrawers(); break;

                case 77: item = new RuinedClock(); break;

                case 78: item = new RuinedChair(); break;

                case 79: item = new RuinedBooks(); break;

                case 80: item = new RuinedBookcase(); break;

                case 81: item = new RuinedArmoire(); break;

                case 82: item = new SmallStretchedHideSouthDeed(); break;

                case 83: item = new SmallStretchedHideEastDeed(); break;

                case 84: item = new PolarBearRugSouthDeed(); break;

                case 85: item = new PolarBearRugEastDeed(); break;

                case 86: item = new MediumStretchedHideSouthDeed(); break;

                case 87: item = new MediumStretchedHideEastDeed(); break;

                case 88: item = new LightFlowerTapestrySouthDeed(); break;

                case 89: item = new LightFlowerTapestryEastDeed(); break;

                case 90: item = new DarkFlowerTapestrySouthDeed(); break;

                case 91: item = new DarkFlowerTapestryEastDeed(); break;

                case 92: item = new BrownBearRugSouthDeed(); break;

                case 93: item = new BrownBearRugEastDeed(); break;

                case 94: item = new WallSconce(); break;

                case 95: item = new WallTorch(); break;

                case 96: item = new CandleShort(); break;

                case 97: item = new CandleLarge(); break;

                case 98: item = new DecorativeSwordNorth(); break;

                case 99: item = new DecorativeSwordWest(); break;

                case 100: item = new Tapestry1N(); break;

                case 101: item = new Tapestry2N(); break;

                case 102: item = new Tapestry2W(); break;

                case 103: item = new Tapestry3N(); break;

                case 104: item = new Tapestry3W(); break;

                case 105: item = new Tapestry4N(); break;

                case 106: item = new Tapestry4W(); break;

                case 107: item = new Tapestry5N(); break;

                case 108: item = new Tapestry5W(); break;

                case 109: item = new Tapestry6N(); break;

                default: item = new CandleSkull(); break;
                }

                item.LootType = LootType.Regular;
                item.Movable  = true;
                PackItem(item);
            }
        }
 public PawnLanternEventArgs(Pawn pawn, Lantern lantern)
 {
     Pawn = pawn;
     Lantern = lantern;
 }
 public static void InvokeUnequippedLantern(object sender, Pawn pawn, Lantern lantern)
 {
     if (Instance.UnequippedLantern != null) Instance.UnequippedLantern(sender, new PawnLanternEventArgs(pawn, lantern));
 }
예제 #31
0
파일: OrbManager.cs 프로젝트: samixvii/aiti
    public void OnLanternPlaced(Lantern lantern)
    {
        float distance = Vector3.Distance(lantern.activeLanternObject.transform.position, Manager.Instance.Child.activeChildObject.transform.position) * distanceScale;

        CreateLanternOrb(lantern, distance);
    }
예제 #32
0
        public HeadlessHorseman() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "The Headless Horseman";
            Body        = 185;
            BaseSoundID = 0x47F;
            Hue         = 0x4001;

            SetStr(430, 500);
            SetDex(90, 120);
            SetInt(700, 800);

            SetHits(5000, 10000);
            SetMana(5000);

            SetDamage(20, 35);

            SetDamageType(ResistanceType.Physical, 75);
            SetDamageType(ResistanceType.Fire, 25);

            SetResistance(ResistanceType.Physical, 40, 60);
            SetResistance(ResistanceType.Fire, 60, 80);
            SetResistance(ResistanceType.Cold, 40, 60);
            SetResistance(ResistanceType.Poison, 40, 60);
            SetResistance(ResistanceType.Energy, 40, 65);

            SetSkill(SkillName.Anatomy, 120.0);
            SetSkill(SkillName.EvalInt, 100.0);
            SetSkill(SkillName.Magery, 100.0);
            SetSkill(SkillName.Meditation, 120.0);
            SetSkill(SkillName.MagicResist, 100.0);
            SetSkill(SkillName.Tactics, 120.0);
            SetSkill(SkillName.Swords, 120.0);

            Fame  = 30000;
            Karma = -30000;

            VirtualArmor = 60;

            PlateChest chest = new PlateChest();

            chest.Hue     = 1345;
            chest.Movable = false;
            AddItem(chest);

            PlateArms arms = new PlateArms();

            arms.Hue     = 1345;
            arms.Movable = false;
            AddItem(arms);

            PlateGloves gloves = new PlateGloves();

            gloves.Hue     = 1345;
            gloves.Movable = false;
            AddItem(gloves);

            PlateGorget gorget = new PlateGorget();

            gorget.Hue     = 1345;
            gorget.Movable = false;
            AddItem(gorget);

            PlateLegs legs = new PlateLegs();

            legs.Hue     = 1345;
            legs.Movable = false;
            AddItem(legs);

            Cloak cloak = new Cloak();

            cloak.Hue     = 1175;
            cloak.Movable = false;
            AddItem(cloak);

            Longsword weapon = new Longsword();

            weapon.Hue     = 1175;
            weapon.Movable = false;
            AddItem(weapon);

            Lantern lantern = new Lantern();

            lantern.Movable = false;
            lantern.Ignite();
            AddItem(lantern);

            ThighBoots boots = new ThighBoots();

            boots.Movable = false;
            AddItem(boots);


            new Nightmare().Rider = this;
        }
예제 #33
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Item   item = new Dagger();
                string msg  = "You conjure a dagger.";

                switch (Utility.RandomMinMax(1, 28))
                {
                case 1: item = new Apple(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some apples."; break;

                case 2: item = new Arrow(); item.Amount = Utility.RandomMinMax(1, 10); msg = "You conjure some arrows."; break;

                case 3: item = new Backpack(); msg = "You conjure a backpack."; break;

                case 4: item = new Bag(); msg = "You conjure a bag."; break;

                case 5: item = new Bandage(); item.Amount = Utility.RandomMinMax(1, 10); msg = "You conjure some bandages."; break;

                case 6: item = new Bedroll(); msg = "You conjure a bedroll."; break;

                case 7: item = new Beeswax(); msg = "You conjure some beeswax."; break;

                case 8: item = new BlueBook(); msg = "You conjure a book."; break;

                case 9: item = new Bolt(); item.Amount = Utility.RandomMinMax(1, 10); msg = "You conjure some crossbow bolts."; break;

                case 10: item = new Bottle(); msg = "You conjure a bottle."; break;

                case 11: item = new BreadLoaf(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some bread."; break;

                case 12: item = new Candle(); msg = "You conjure a candle."; break;

                case 13: item = new Club(); msg = "You conjure a club."; break;

                case 14: item = new Dagger(); msg = "You conjure a dagger."; break;

                case 15: item = new DarkYarn(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some yarn."; break;

                case 16: item = new FloppyHat(); msg = "You conjure a hat."; break;

                case 17: item = new Jar(); msg = "You conjure a jar."; break;

                case 18: item = new Kindling(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some kindling."; break;

                case 19: item = new Lantern(); msg = "You conjure a lantern."; break;

                case 20: item = new Lockpick(); msg = "You conjure a lockpick."; break;

                case 21: item = new OilCloth(); msg = "You conjure an oil cloth."; break;

                case 22: item = new Pouch(); msg = "You conjure a pouch."; break;

                case 23: item = new Robe(); msg = "You conjure a robe."; break;

                case 24: item = new Shoes(); msg = "You conjure some shoes."; break;

                case 25: item = new SpoolOfThread(); item.Amount = Utility.RandomMinMax(1, 5); msg = "You conjure some thread."; break;

                case 26: item = new TenFootPole(); msg = "You conjure a ten foot pole."; break;

                case 27: item = new Torch(); msg = "You conjure a torch."; break;

                case 28: item = new Waterskin(); msg = "You conjure a waterskin."; break;
                }

                Caster.SendMessage(msg);

                Caster.AddToBackpack(item);

                Caster.FixedParticles(0, 10, 5, 2003, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0), 0, EffectLayer.RightHand);
                Caster.PlaySound(0x1E2);

                Server.Misc.Research.ConsumeScroll(Caster, true, spellIndex, true);
            }

            FinishSequence();
        }
예제 #34
0
    // Use this for initialization
    void Start()
    {
        lightTransform = transform;

        lightSource = GetComponent<Light>();

        range = light.range;

        maxRangeSqr = (range * range)/ 1.25f;

        GameObject targetObject = GameObject.Find( "Player" );

        if ( targetObject )
        {
            target = targetObject.transform;

            lanternScript = target.GetComponentInChildren< Lantern >();
        }
        else
        {
            Debug.Log( "no object named player was found" );
        }

        GameObject targetObject2 = GameObject.Find( "Magic_Lantern" );

        if ( targetObject )
        {
            targetLantern = targetObject2.transform ;

            lanternScript = target.GetComponentInChildren< Lantern >();
        }
        else
        {
            Debug.Log( "no object named player was found" );
        }
    }
    public void Realize()
    {
        if (realizedObject != null)
        {
            return;
        }
        switch ((patch_AbstractPhysicalObject.AbstractObjectType)type)
        {
        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.Rock:
            realizedObject = new Rock(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.Spear:
            if (((this as AbstractPhysicalObject) as AbstractSpear).explosive)
            {
                realizedObject = new ExplosiveSpear(this, world);
            }
            else
            {
                realizedObject = new Spear(this, world);
            }
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.FlareBomb:
            realizedObject = new FlareBomb(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.VultureMask:
            realizedObject = new VultureMask(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.PuffBall:
            realizedObject = new PuffBall(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.DangleFruit:
            realizedObject = new DangleFruit(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.PebblesPearl:
            realizedObject = new PebblesPearl(this, world);
            break;

        //case (patch_AbstractPhysicalObject.AbstractObjectType)patch_AbstractPhysicalObject.AbstractObjectType.MoonPearl:
        //    this.realizedObject = new MoonPearl(this, this.world);
        //    break;
        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.SLOracleSwarmer:
            realizedObject = new SLOracleSwarmer(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.SSOracleSwarmer:
            realizedObject = new SSOracleSwarmer(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractObjectType.LMOracleSwarmer:
            realizedObject = new LMOracleSwarmer(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.DataPearl:
            realizedObject = new DataPearl(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.SeedCob:
            realizedObject = new SeedCob(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.WaterNut:
            if (((this as AbstractPhysicalObject) as WaterNut.AbstractWaterNut).swollen)
            {
                realizedObject = new SwollenWaterNut(this);
            }
            else
            {
                realizedObject = new WaterNut(this);
            }
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.JellyFish:
            realizedObject = new JellyFish(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.Lantern:
            realizedObject = new Lantern(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.KarmaFlower:
            realizedObject = new KarmaFlower(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.Mushroom:
            realizedObject = new Mushroom(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.VoidSpawn:
            realizedObject = new VoidSpawn(this, (Room.realizedRoom == null) ? 0f : Room.realizedRoom.roomSettings.GetEffectAmount(RoomSettings.RoomEffect.Type.VoidMelt), Room.realizedRoom != null && VoidSpawnKeeper.DayLightMode(Room.realizedRoom));
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.FirecrackerPlant:
            realizedObject = new FirecrackerPlant(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)(patch_AbstractPhysicalObject.AbstractObjectType) AbstractPhysicalObject.AbstractObjectType.SlimeMold:
            realizedObject = new SlimeMold(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.FlyLure:
            realizedObject = new FlyLure(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.ScavengerBomb:
            realizedObject = new ScavengerBomb(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.SporePlant:
            realizedObject = new SporePlant(this, world);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.EggBugEgg:
            realizedObject = new EggBugEgg(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.NeedleEgg:
            realizedObject = new NeedleEgg(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.DartMaggot:
            realizedObject = new DartMaggot(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.BubbleGrass:
            realizedObject = new BubbleGrass(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.NSHSwarmer:
            realizedObject = new NSHSwarmer(this);
            break;

        case (patch_AbstractPhysicalObject.AbstractObjectType)AbstractPhysicalObject.AbstractObjectType.OverseerCarcass:
            realizedObject = new OverseerCarcass(this, world);
            break;

        case AbstractObjectType.SmallPiston:
            realizedObject = new SmallPiston(this);
            break;

        case AbstractObjectType.LargePiston:
            realizedObject = new LargePiston(this);
            break;

        case AbstractObjectType.GiantPiston:
            realizedObject = new GiantPiston(this);
            break;
        }
        for (int i = 0; i < stuckObjects.Count; i++)
        {
            if (stuckObjects[i].A.realizedObject == null && stuckObjects[i].A != this)
            {
                stuckObjects[i].A.Realize();
            }
            if (stuckObjects[i].B.realizedObject == null && stuckObjects[i].B != this)
            {
                stuckObjects[i].B.Realize();
            }
        }
    }