Esempio n. 1
0
        protected void Awake()
        {
            item                  = this.GetComponent <Item>();
            module                = item.data.GetModule <ItemModuleMjolnir>();
            agent                 = item.gameObject.GetComponent <NavMeshAgent>();
            returning             = item.gameObject.GetComponent <MjolnirReturning>();
            item.OnGrabEvent     += HammerGrab;
            item.OnTeleGrabEvent += HammerTeleGrab;

            headTransform = item.definition.GetCustomReference("pointingTransform");
        }
Esempio n. 2
0
 protected void Awake()
 {
     item                    = this.GetComponent <Item>();
     module                  = item.data.GetModule <ItemModuleMjolnir>();
     pointingTransform       = item.definition.GetCustomReference("pointingTransform");
     bottomTransform         = item.definition.GetCustomReference("bottomTransform");
     playerTransform         = Creature.player.gameObject.transform;
     item.OnCollisionEvent  += OnChargedCollisionEvent;
     item.OnHeldActionEvent += OnHeld;
     mjolnir                 = item.transform;
     SFX = mjolnir.Find("mjolnir").Find("SFX");
     VFX = mjolnir.Find("mjolnir").Find("VFX");
     VFX.Find("Charged").Find("Light").GetComponent <Light>().enabled = false;
 }