示例#1
0
    //custom func
    public void Setup(int firedFrom, ShipData.ProjectileInfo projInfo, GameObject target)
    {
        _projInfo      = projInfo;
        _target        = target;
        this.firedFrom = firedFrom;

        //projectile visuels
        switch (_projInfo.GetProjType)
        {
        case ShipData.ProjectileInfo.projTypes.missile:
            break;

        case ShipData.ProjectileInfo.projTypes.laser:
            break;

        case ShipData.ProjectileInfo.projTypes.plasma:
            break;

        default:
            break;
        }
    }
示例#2
0
    //custom
    public void FireProjectile(GameObject firedFrom, int firedfromIdentifyer, ShipData.ProjectileInfo proj, GameObject target = null)
    {
        GameObject newObj = Instantiate(__projectilePrefab, firedFrom.transform.position, firedFrom.transform.rotation);

        newObj.GetComponent <Projectile>().Setup(firedfromIdentifyer, proj, target);
    }