Esempio n. 1
0
 // Token: 0x06000139 RID: 313 RVA: 0x0000B3CC File Offset: 0x000095CC
 public void InitializeAirStrikeData(IntVec3 targetPosition, AirStrikeDef airStrikeDef)
 {
     this.targetPosition        = targetPosition;
     this.airStrikeDef          = airStrikeDef;
     this.ticksBeforeOverflight = this.airStrikeDef.ticksBeforeOverflightInitialValue;
     this.ticksAfterOverflight  = 0;
     this.spaceshipKind         = ShipKind.Airstrike;
     this.ComputeAirStrikeRotation(this.targetPosition);
     base.ConfigureShipTexture(this.spaceshipKind, airStrikeDef);
     this.spaceshipScale = new Vector3(airStrikeDef.scale.x, 1f, airStrikeDef.scale.y);
     base.Tick();
 }
Esempio n. 2
0
        // Token: 0x06000122 RID: 290 RVA: 0x0000A7F0 File Offset: 0x000089F0
        public void ConfigureShipTexture(ShipKind spaceshipKind, AirStrikeDef strikeDef = null)
        {
            switch (spaceshipKind)
            {
            /*
             * case SpaceshipKind.CargoPeriodic:
             * case SpaceshipKind.CargoRequested:
             * case SpaceshipKind.Damaged:
             *      this.spaceshipTexture = FlyingSpaceship.supplySpaceshipTexture;
             *      this.spaceshipShadowTexture = FlyingSpaceship.supplySpaceshipShadowTexture;
             *      this.baseSpaceshipScale = FlyingSpaceship.supplySpaceshipScale;
             *      break;
             * case SpaceshipKind.DispatcherDrop:
             * case SpaceshipKind.DispatcherPick:
             *      this.spaceshipTexture = FlyingSpaceship.dispatcherTexture;
             *      this.spaceshipShadowTexture = FlyingSpaceship.supplySpaceshipShadowTexture;
             *      this.baseSpaceshipScale = FlyingSpaceship.supplySpaceshipScale;
             *      break;
             * case SpaceshipKind.Medical:
             *      this.spaceshipTexture = FlyingSpaceship.medicalSpaceshipTexture;
             *      this.spaceshipShadowTexture = FlyingSpaceship.medicalSpaceshipShadowTexture;
             *      this.baseSpaceshipScale = FlyingSpaceship.medicalSpaceshipScale;
             *      break;
             */
            case ShipKind.Airstrike:
                this.spaceshipTexture       = FlyingShip.strikeshipTexture;
                this.spaceshipShadowTexture = FlyingShip.strikeshipShadowTexture;
                this.baseSpaceshipScale     = FlyingShip.supplySpaceshipScale;
                break;

            default:
                Log.ErrorOnce("Adeptus Airstrike: unhandled ShipKind (" + this.spaceshipKind.ToString() + ").", 123456784);
                break;
            }
            if (strikeDef != null && spaceshipKind == ShipKind.Airstrike)
            {
                if (strikeDef.graphicData != null)
                {
                    this.spaceshipTexture = strikeDef.graphicData.GraphicColoredFor(this).MatSingle;
                }
                if (strikeDef.shadowData != null)
                {
                    this.spaceshipShadowTexture = strikeDef.shadowData.GraphicColoredFor(this).MatSingle;
                }
                if (strikeDef.scale != default(Vector2))
                {
                    this.spaceshipScale       = new Vector3(strikeDef.scale.x, 1f, strikeDef.scale.y);
                    this.spaceshipShadowScale = new Vector3(strikeDef.scale.x, 1f, strikeDef.scale.y);
                }
            }
        }