Exemplo n.º 1
0
 public PetIdleState(PetObject obj) : base(obj)
 {
     m_OwnerTarget    = pet.owner.GetComponent <PlayerTarget>();
     m_OwnerDamagable = pet.owner.GetComponent <DamagableObject>();
     m_PetWeapon      = pet.GetComponent <PetWeapon>();
     m_PetTarget      = pet.GetComponent <PlayerTarget>();
 }
Exemplo n.º 2
0
        //private NebulaObject m_ChestObj;

        public CollectContainerState(PetObject petObj, NebulaObject chestObj) : base(petObj)
        {
            //m_ChestObj = chestObj;
            if (m_ChestObjects == null)
            {
                m_ChestObjects = new Queue <NebulaObject>();
            }
            m_ChestObjects.Enqueue(chestObj);
        }
Exemplo n.º 3
0
 public override void Start()
 {
     base.Start();
     m_Pet = GetComponent <PetObject>();
     ForceSetHealth(maximumHealth);
     SetIgnoreDamageAtStart(false);
     SetIgnoreDamageInterval(0);
     SetCreateChestOnKilling(false);
 }
Exemplo n.º 4
0
 public override void Start()
 {
     base.Start();
     m_Pet = GetComponent <PetObject>();
     //m_OwnerMovable = GetComponent<PetObject>().owner.GetComponent<ShipMovable>();
     //if(m_OwnerMovable) {
     //    s_Log.Info("owner movable cached...".Color(LogColor.red));
     //} else {
     //    s_Log.Info("owner movable not found...".Color(LogColor.red));
     //}
 }
Exemplo n.º 5
0
        public override void Start()
        {
            base.Start();
            m_Pet     = GetComponent <PetObject>();
            m_Target  = GetComponent <PlayerTarget>();
            m_Message = GetComponent <MmoMessageComponent>();
            m_Race    = GetComponent <RaceableObject>();

            if (m_Pet)
            {
                if (m_Pet.info != null)
                {
                    m_Timer = m_Pet.info.Cooldown(nebulaObject.resource.petParameters.cooldown);
                }
            }
        }
Exemplo n.º 6
0
 public bool ActivateSkill(string petId, int skill, bool activated)
 {
     bool success = pets.ActivateSkill(petId, skill, activated);
     if(success) {
         if(ownerAtSpace) {
             var pet = pets.GetPet(petId);
             if(pet != null ) {
                 PetObject petObject = null;
                 if(m_Pets.TryGetValue(petId, out petObject)) {
                     petObject.Init(new PetObject.PetObjectInitData(nebulaObject, pet));
                 }
             }
         }
         GetComponent<MmoMessageComponent>().ReceivePetsUpdate();
     }
     return success;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Update killed time on killed pet
 /// </summary>
 public void UpdateKilledTime(PetObject pet)
 {
     // s_Log.InfoFormat("update killed time on pet = {0}".Color(LogColor.orange), CommonUtils.SecondsFrom1970());
     var info = m_PetInfoCollection.GetPet(pet.nebulaObject.Id);
     info.SetKilledTime(CommonUtils.SecondsFrom1970());
 }
Exemplo n.º 8
0
 public PetBaseState(PetObject inPet)
 {
     m_Pet = inPet;
 }
Exemplo n.º 9
0
 public Condition(NebulaObject inSource)
 {
     m_Source = inSource;
     m_Pet    = m_Source.GetComponent <PetObject>();
 }
Exemplo n.º 10
0
 public override void Start()
 {
     base.Start();
     m_PetObject = GetComponent <PetObject>();
 }