public BombInfo(Constants.BombTypes type, MyVector3 initPosition, float initAngle, float timeout, bool isLocked, BombMovementData movement, BombRotateData rotate) { this.type = type; this.initPosition = initPosition; this.initAngle = initAngle; this.isLocked = isLocked; this.timeout = timeout; this.movement = movement; this.rotate = rotate; }
public BombInfo(BombInfo other) { this.type = other.type; this.initPosition = other.initPosition; this.initAngle = other.initAngle; this.isLocked = other.isLocked; this.timeout = other.timeout; this.movement = other.movement; this.rotate = other.rotate; }
public virtual void setBombData(BombInfo bombInfo) { type = bombInfo.type; initPosition = bombInfo.initPosition.GetV3(); initAngle = bombInfo.initAngle; isLocked = bombInfo.isLocked; timeout = bombInfo.timeout; switch (type) { case Constants.BombTypes.normal: baseBomb = new BaseNormalBomb(); break; case Constants.BombTypes.shooter: baseBomb = new BaseShooterBomb(); break; case Constants.BombTypes.target: baseBomb = new BaseTargetBomb(); break; case Constants.BombTypes.wave: baseBomb = new BaseWaveBomb(); break; case Constants.BombTypes.acid: baseBomb = new BaseAcidBomb(); break; } radius = baseBomb.radius; speed = baseBomb.speed; numPoints = baseBomb.numPoints; bulletDamage = baseBomb.bulletDamage; bulletHealth = baseBomb.bulletHealth; health = baseBomb.health; currentHealth = baseBomb.currentHealth; valueInCoin = baseBomb.valueInCoin; intervalCounter = 0; if (isLocked) { locked.SetActive(true); } else { locked.SetActive(false); } if (timeout > 0) { timer.gameObject.SetActive(true); } else { timer.gameObject.SetActive(false); } if (bombInfo.movement == null || bombInfo.movement.speed <= 0) { GetComponent <BombMovement>().enabled = false; } else { GetComponent <BombMovement>().enabled = true; GetComponent <BombMovement>().SetMovementData(bombInfo.movement); } if (bombInfo.rotate == null || bombInfo.rotate.speed <= 0) { GetComponent <BombRotate>().enabled = false; } else { GetComponent <BombRotate>().enabled = true; GetComponent <BombRotate>().SetRotateData(bombInfo.rotate); } }
public ExtraBombInfo(Constants.BombTypes bombType, int count) { this.bombType = bombType; this.count = count; }