Exemple #1
0
 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");
    }
Exemple #3
0
 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>();
 }
Exemple #4
0
 protected override void FindGunPointTransform()
 {
     FireEffect_Transform = M_Transform.Find("Armature/Weapon/FireEffect").GetComponent <Transform>();
 }
Exemple #5
0
 protected override void InitShootPos()
 {
     ShootPos = M_Transform.Find("Armature/Arm_L/Forearm_L/Wrist_L/Weapon/EffectPos_A").GetComponent <Transform>();
 }
Exemple #6
0
 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>();
 }
Exemple #8
0
 protected override void InitShootPos()
 {
     ShootPos = M_Transform.Find("Hunting_Rifle/EffectPos_A").GetComponent <Transform>();
 }
Exemple #9
0
 protected override void InitShellPos()
 {
     // 位置属性加载
     ShellPos = M_Transform.Find("Assault_Rifle/EffectPos_B").GetComponent <Transform>();
 }
Exemple #10
0
 protected override void InitHoldPostPos()
 {
     FireEffect_Transform = M_Transform.Find("Armature/Weapon/FireEffect").GetComponent <Transform>();
 }
Exemple #11
0
    private Transform m_PivotTransform;         // 中心点用于尾部动画.

    /// <summary>
    /// 查找加载初始化.
    /// </summary>
    protected override void FindAndLoadInit()
    {
        m_BoxCollider = gameObject.GetComponent <BoxCollider>();

        m_PivotTransform = M_Transform.Find("Pivot");
    }
Exemple #12
0
 protected override void FindGunPoint()
 {
     GunPoint = M_Transform.Find(PathDefine.gunTransName + "/" + PathDefine.rifleGunPointTransName).transform;
 }
Exemple #13
0
 public override void Init()
 {
     m_BoxCollider   = gameObject.GetComponent <BoxCollider>();
     pivot_Transform = M_Transform.Find("Pivot").GetComponent <Transform>();
 }
Exemple #14
0
 protected override void FindGunPoint()
 {
     GunPoint = M_Transform.Find(PathDefine.gunTransName + "/" + PathDefine.sniperGunPointTransName);
 }