コード例 #1
0
    //Weapon - Projectile
    public Item(int id,
                string title,
                Sprite image,
                Defs.ItemCategory category,
                int stackLimit,
                float weight,
                Defs.WeaponType weaponType,
                GameObject weaponObject,
                AudioClip[] windupSound,
                AudioClip[] releaseSound,
                AudioClip[] hitSound,
                AudioClip[] flightSound,
                Effector costEffector,
                Effector selfEffector,
                Effector selfOnHitEffector,
                Effector targetEffector,
                float windupTime,
                float strikeTime,
                float recoveryTime,
                GameObject projectileObject,
                float range,
                float speed,
                int targetLimit)
    {
        //Required
        this.ID         = id;
        this.Title      = title;
        this.Image      = image;
        this.Category   = category;
        this.StackLimit = stackLimit;
        this.Weight     = weight;

        //Effectors
        this.CostEffector      = costEffector;
        this.SelfEffector      = selfEffector;
        this.SelfOnHitEffector = selfOnHitEffector;
        this.TargetEffector    = targetEffector;

        //Weapon Specific
        this.WeaponType   = weaponType;
        this.WeaponObject = weaponObject;
        //General
        this.WindupSound  = windupSound;
        this.StrikeSound  = releaseSound;
        this.HitSound     = hitSound;
        this.WindupTime   = windupTime;
        this.StrikeTime   = strikeTime;
        this.RecoveryTime = recoveryTime;
        //Projectile
        this.ProjectileObject = projectileObject;
        this.FlightSound      = flightSound;
        this.Range            = range;
        this.Speed            = speed;
        this.TargetLimit      = targetLimit;
    }
コード例 #2
0
    //Weapon - Shield
    public Item(int id,
                string title,
                Sprite image,
                Defs.ItemCategory category,
                int stackLimit,
                float weight,
                Defs.WeaponType weaponType,
                GameObject weaponObject,
                AudioClip[] windupSound,
                AudioClip[] strikeSound,
                Effector costEffector,
                Effector selfEffector,
                Effector selfOnHitEffector,
                Effector targetEffector,
                float windupTime,
                float strikeTime,
                float recoveryTime,
                AudioClip[] blockSound,
                int blockAngle)
    {
        //Required
        this.ID         = id;
        this.Title      = title;
        this.Image      = image;
        this.Category   = category;
        this.StackLimit = stackLimit;
        this.Weight     = weight;

        //Effectors
        this.CostEffector      = costEffector;
        this.SelfEffector      = selfEffector;
        this.SelfOnHitEffector = selfOnHitEffector;
        this.TargetEffector    = targetEffector;

        //Weapon Specific
        this.WeaponType   = weaponType;
        this.WeaponObject = weaponObject;
        //General
        this.WindupSound  = windupSound;
        this.StrikeSound  = strikeSound;
        this.WindupTime   = windupTime;
        this.StrikeTime   = strikeTime;
        this.RecoveryTime = recoveryTime;
        //Shield
        this.BlockSound = blockSound;
        this.BlockAngle = blockAngle;
    }
コード例 #3
0
    //Consumeable
    public Item(int id,
                string title,
                Sprite image,
                Defs.ItemCategory category,
                int stackLimit,
                float weight,
                Effector costEffector,
                Effector selfEffector,
                Effector selfOnHitEffector,
                Effector targetEffector,
                float usageDelay,
                bool isProjectileWeapon,
                GameObject projectileObject,
                float range,
                float speed,
                int targetLimit)
    {
        //Required
        this.ID         = id;
        this.Title      = title;
        this.Image      = image;
        this.Category   = category;
        this.StackLimit = stackLimit;
        this.Weight     = weight;

        //Effectors
        this.CostEffector      = costEffector;
        this.SelfEffector      = selfEffector;
        this.SelfOnHitEffector = selfOnHitEffector;
        this.TargetEffector    = targetEffector;

        //Consumeable Specific
        this.UsageDelay         = usageDelay;
        this.IsProjectileWeapon = isProjectileWeapon;

        //Projectile Specific
        this.ProjectileObject = projectileObject;
        this.Range            = range;
        this.Speed            = speed;
        this.TargetLimit      = targetLimit;
    }