Exemple #1
0
 void OnAccessoryInstantiate(ItemSolid itemSolid)
 {
     _accessorySolid = itemSolid;
     _accessory      = (Accessory)_accessorySolid.item;
     _accessorySolid.transform.SetParent(_animator.GetBoneTransform(accessory.targetBone));
     _accessorySolid.transform.localPosition = Vector3.zero;
     _accessorySolid.transform.localRotation = Quaternion.identity;
     _accessorySolid.transform.localScale    = new Vector3(0.1f, 0.1f, 0.1f);
     _accessorySolid.enabled = false;
     _accessorySolid.GetComponent <Floater>().enabled           = false;
     _accessorySolid.GetComponent <ItemSpawnEffector>().enabled = false;
 }
Exemple #2
0
 void OnWeaponInstantiate(ItemSolid itemSolid)
 {
     _weaponSolid = itemSolid;
     _weapon      = (Weapon)_weaponSolid.item;
     _weaponSolid.transform.SetParent(_animator.GetBoneTransform(weapon.targetBone));
     _weaponSolid.transform.localPosition = Vector3.zero;
     _weaponSolid.transform.localRotation = Quaternion.identity;
     _weaponSolid.transform.localScale    = new Vector3(0.08f, 0.08f, 0.08f);
     _weaponSolid.enabled = false;
     _weaponSolid.GetComponent <Floater>().enabled           = false;
     _weaponSolid.GetComponent <ItemSpawnEffector>().enabled = false;
     //Should Make AttackerNULL and AttackerImpl for ProjectileWeapon
     _attackSubject         = _weaponSolid.GetComponent <AttackSubject>();
     _attackSubject.enabled = false;
     _attackSubject.owner   = this;
 }
Exemple #3
0
 void OnWeaponInstantiate(ItemSolid itemSolid)
 {
     _weaponSolid = itemSolid;
     _weapon = (Weapon)_weaponSolid.item;
     _weaponSolid.transform.SetParent(_animator.GetBoneTransform(weapon.targetBone));
     _weaponSolid.transform.localPosition = Vector3.zero;
     _weaponSolid.transform.localRotation = Quaternion.identity;
     _weaponSolid.transform.localScale = new Vector3(0.08f, 0.08f, 0.08f);
     _weaponSolid.enabled = false;
     _weaponSolid.GetComponent<Floater>().enabled = false;
     _weaponSolid.GetComponent<ItemSpawnEffector>().enabled = false;
     //Should Make AttackerNULL and AttackerImpl for ProjectileWeapon
     _attackSubject = _weaponSolid.GetComponent<AttackSubject>();
     _attackSubject.enabled = false;
     _attackSubject.owner = this;
 }
Exemple #4
0
 void OnAccessoryInstantiate(ItemSolid itemSolid)
 {
     _accessorySolid = itemSolid;
     _accessory = (Accessory)_accessorySolid.item;
     _accessorySolid.transform.SetParent(_animator.GetBoneTransform(accessory.targetBone));
     _accessorySolid.transform.localPosition = Vector3.zero;
     _accessorySolid.transform.localRotation = Quaternion.identity;
     _accessorySolid.transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
     _accessorySolid.enabled = false;
     _accessorySolid.GetComponent<Floater>().enabled = false;
     _accessorySolid.GetComponent<ItemSpawnEffector>().enabled = false;
 }