stub-api
Lucie Bedouret 3 years ago
commit edd8a36fcf

@ -1,6 +1,7 @@
import { FC, ReactNode } from "react" import { FC, ReactNode } from "react"
import { Button, Image, ImageStyle, Text, View } from "react-native" import { Button, Image, ImageStyle, Text, View } from "react-native"
import { Skin } from "../core/Skin" import { Skin } from "../core/Skin"
import { Asset } from 'expo-asset';
import React from "react" import React from "react"
export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => { export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => {

@ -1,11 +1,14 @@
export interface Game{ import { randomBytes } from "crypto";
private Name:String; import { ImageSourcePropType } from "react-native";
private ImageSource:String;
private GameSource:String;
constructor(name:String, imageSource:String, gameSource:String){ export class Game{
private Name:string;
private ImageSource:ImageSourcePropType;
private GameSource:string ;
constructor (name:string, imageSource:ImageSourcePropType, gameSource:string){
this.Name=name; this.Name=name;
this.ImageSource=imageSource this.ImageSource=imageSource;
this.GameSource=gameSource; this.GameSource=gameSource;
} }
@ -13,15 +16,15 @@ export interface Game{
return this.Name; return this.Name;
} }
setName(name:String){ setName(name:string){
this.Name=name; this.Name=name;
} }
getImageSource(imageSource:String){ getImageSource(){
return this.ImageSource; return this.ImageSource;
} }
setImageSource(imageSource:String){ setImageSource(imageSource:ImageSourcePropType){
this.ImageSource=imageSource; this.ImageSource=imageSource;
} }
@ -29,7 +32,7 @@ export interface Game{
return this.GameSource; return this.GameSource;
} }
setGameSource(gameSource:String){ setGameSource(gameSource:string){
this.GameSource=gameSource; this.GameSource=gameSource;
} }
} }

@ -1,8 +1,10 @@
import { ImageSourcePropType } from "react-native";
export class Skin{ export class Skin{
private Name: string; private Name: string;
private Source: any; private Source: ImageSourcePropType;
constructor(name: string, source:any){ constructor(name: string, source:ImageSourcePropType){
this.Name=name; this.Name=name;
this.Source=source; this.Source=source;
} }
@ -11,7 +13,7 @@ export class Skin{
this.Name=name; this.Name=name;
} }
setSkinSource(source: any){ setSkinSource(source: ImageSourcePropType){
this.Source=source; this.Source=source;
} }

@ -18,6 +18,7 @@ tabSkin=[skinTest];
tabSkin.push(skinTest2); tabSkin.push(skinTest2);
let tabConv:Conversation[]=[]; let tabConv:Conversation[]=[];
const UserActu=new User("14", "leBg", "ouioui", "grand", new Date(2022,12,12), 12222, 123324, skinTest, tabSkin, tabConv); const UserActu=new User("14", "leBg", "ouioui", "grand", new Date(2022,12,12), 12222, 123324, skinTest, tabSkin, tabConv);
const engrenage = require('../../assets/Icons/UnSelected/Cogs.png'); const engrenage = require('../../assets/Icons/UnSelected/Cogs.png');
const gamepad = require('../../assets/Icons/Selected/SGamepad.png'); const gamepad = require('../../assets/Icons/Selected/SGamepad.png');
const message = require('../../assets/Icons/UnSelected/Chat.png'); const message = require('../../assets/Icons/UnSelected/Chat.png');

Loading…
Cancel
Save