protected override void Init() { bulletEffect_Transform = M_Transform.Find("Armature/Weapon/BulletEffect").GetComponent <Transform>(); bulletEffect_Clip = Resources.Load <AudioClip>("Soures/Shotgun_Pump"); bulletEffect_Shell = Resources.Load <GameObject>("Prefabs/Gun/Shotgun_Shell"); prefab_bullet = Resources.Load <GameObject>("Prefabs/Gun/Shotgun_Bullet"); }
protected override void Init() { bulletEffect_Transform = M_Transform.Find("Assault_Rifle/BulletEffect").GetComponent <Transform>(); bulletParentTransform = GameObject.Find("TempObject/BulletParent").GetComponent <Transform>(); gunPointEffectParent = GameObject.Find("TempObject/GunPointEffectParent").GetComponent <Transform>(); prefab_bullet = Resources.Load <GameObject>("Prefabs/Gun/Bullet"); }
protected override void InitOther() { Damage = 0; m_BoxCollider = gameObject.GetComponent <BoxCollider>(); if (m_BoxCollider == null) { m_BoxCollider = gameObject.AddComponent <BoxCollider>(); } m_Pivot = M_Transform.Find("Pivot").GetComponent <Transform>(); }
protected override void FindGunPointTransform() { FireEffect_Transform = M_Transform.Find("Armature/Weapon/FireEffect").GetComponent <Transform>(); }
protected override void InitShootPos() { ShootPos = M_Transform.Find("Armature/Arm_L/Forearm_L/Wrist_L/Weapon/EffectPos_A").GetComponent <Transform>(); }
protected override void InitShellPos() { ShellPos = M_Transform.Find("Armature/Weapon/EffectPos_B").GetComponent <Transform>(); }
//子类实现父类的定义的初始化枪口位置的抽象方法 protected override void FindGunPointTransform() { FireEffect_Transform = M_Transform.Find("Assault_Rifle/FireEffect").GetComponent <Transform>(); }
protected override void InitShootPos() { ShootPos = M_Transform.Find("Hunting_Rifle/EffectPos_A").GetComponent <Transform>(); }
protected override void InitShellPos() { // 位置属性加载 ShellPos = M_Transform.Find("Assault_Rifle/EffectPos_B").GetComponent <Transform>(); }
protected override void InitHoldPostPos() { FireEffect_Transform = M_Transform.Find("Armature/Weapon/FireEffect").GetComponent <Transform>(); }
private Transform m_PivotTransform; // 中心点用于尾部动画. /// <summary> /// 查找加载初始化. /// </summary> protected override void FindAndLoadInit() { m_BoxCollider = gameObject.GetComponent <BoxCollider>(); m_PivotTransform = M_Transform.Find("Pivot"); }
protected override void FindGunPoint() { GunPoint = M_Transform.Find(PathDefine.gunTransName + "/" + PathDefine.rifleGunPointTransName).transform; }
public override void Init() { m_BoxCollider = gameObject.GetComponent <BoxCollider>(); pivot_Transform = M_Transform.Find("Pivot").GetComponent <Transform>(); }
protected override void FindGunPoint() { GunPoint = M_Transform.Find(PathDefine.gunTransName + "/" + PathDefine.sniperGunPointTransName); }