Esempio n. 1
0
        protected override void OnInitialize()
        {
            //InitializeMappings();

            StatSet         statSet         = StatSets.CreateWarriorStatSet(Owner);
            HealthComponent healthComponent = new HealthComponent(Owner, statSet);
            WeaponComponent weaponComponent = new WeaponComponent(Owner, Weapons.CreateSlicerClaymore());

            Owner.AddComponent(statSet);
            Owner.AddComponent(healthComponent);
            Owner.AddComponent(weaponComponent);

            Owner.InitializeComponents();

            spriterComponent.ChangeAnimation("Idle");
            spriterComponent.Scale = 0.4f;

            spriterComponent.OnAnimationChanged += spriterComponent_OnAnimationChanged;
            Owner.FirstComponentOfType <Wallet>().AddCoins(7000f);
            Owner.FirstComponentOfType <TargetingComponent>().Ignore("player");

            r = new DamageRenderer(Owner);
            r.Initialize();
            r.Color = Color.Green;

            Owner.AddComponent(r);
        }