Exemplo n.º 1
0
 public override void PreProcess(IPrefabProcessor process, GameObject rootObj, string name, bool serverside, bool clientside, bool bundling)
 {
     base.PreProcess(process, rootObj, name, serverside, clientside, bundling);
     damageRenderer = GetComponent <DamageRenderer>();
     RefreshParameters();
     lights = GetComponentsInChildren <VehicleLight>();
 }
Exemplo n.º 2
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);
        }