Пример #1
0
    public void Call()
    {
        CH47HelicopterAIController component = GameManager.server.CreateEntity(heliPrefab.resourcePath).GetComponent <CH47HelicopterAIController>();

        if ((bool)component)
        {
            Vector3         size    = TerrainMeta.Size;
            CH47LandingZone closest = CH47LandingZone.GetClosest(base.transform.position);
            Vector3         zero    = Vector3.zero;
            zero.y = closest.transform.position.y;
            Vector3 vector   = Vector3Ex.Direction2D(closest.transform.position, zero);
            Vector3 position = closest.transform.position + vector * startDist;
            position.y = closest.transform.position.y;
            component.transform.position = position;
            component.SetLandingTarget(closest.transform.position);
            component.Spawn();
        }
    }
Пример #2
0
    public void Call()
    {
        CH47HelicopterAIController component = (CH47HelicopterAIController)((Component)GameManager.server.CreateEntity(this.heliPrefab.resourcePath, (Vector3)null, (Quaternion)null, true)).GetComponent <CH47HelicopterAIController>();

        if (!Object.op_Implicit((Object)component))
        {
            return;
        }
        Vector3         size    = TerrainMeta.Size;
        CH47LandingZone closest = CH47LandingZone.GetClosest(((Component)this).get_transform().get_position());
        Vector3         zero    = Vector3.get_zero();

        zero.y = ((Component)closest).get_transform().get_position().y;
        Vector3 vector3_1 = Vector3Ex.Direction2D(((Component)closest).get_transform().get_position(), zero);
        Vector3 vector3_2 = Vector3.op_Addition(((Component)closest).get_transform().get_position(), Vector3.op_Multiply(vector3_1, this.startDist));

        vector3_2.y = ((Component)closest).get_transform().get_position().y;
        ((Component)component).get_transform().set_position(vector3_2);
        component.SetLandingTarget(((Component)closest).get_transform().get_position());
        component.Spawn();
    }
    public void Call()
    {
        GameManager gameManager = GameManager.server;
        string      str         = this.heliPrefab.resourcePath;
        Vector3     vector3     = new Vector3();
        Quaternion  quaternion  = new Quaternion();
        CH47HelicopterAIController component = gameManager.CreateEntity(str, vector3, quaternion, true).GetComponent <CH47HelicopterAIController>();

        if (component)
        {
            Vector3         size     = TerrainMeta.Size;
            CH47LandingZone closest  = CH47LandingZone.GetClosest(base.transform.position);
            Vector3         vector31 = Vector3.zero;
            vector31.y = closest.transform.position.y;
            Vector3 vector32 = Vector3Ex.Direction2D(closest.transform.position, vector31);
            Vector3 vector33 = closest.transform.position + (vector32 * this.startDist);
            vector33.y = closest.transform.position.y;
            component.transform.position = vector33;
            component.SetLandingTarget(closest.transform.position);
            component.Spawn();
        }
    }